Mac Developer Library

Developer

IOStreamBuffer Class Reference

Options
Deployment Target:

On This Page
Language:

IOStreamBuffer

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Not Applicable

Objective-C

@import Kernel;

Availability


Available in OS X v10.5 and later.

A class representing a data buffer that is part of an IOStream.

  • Gets the buffer identifier for the IOStreamBuffer object.

    Declaration

    C++

    virtual IOStreamBufferID getBufferID( void);

    Discussion

    The buffer identifier is unique across all buffers in a stream.

  • Declaration

    C++

    virtual SInt32 getClientReferenceCount( void );

    Return Value

    The count of client references to this buffer. It may be positive or negative, depending on whether the client is sending data into the kernel, or the kernel is sending data out to the client.

  • Declaration

    C++

    virtual IOMemoryDescriptor *getControlBuffer( void);

    Return Value

    A pointer to the IOMemoryDescriptor for the control buffer.

  • Declaration

    C++

    virtual IOMemoryDescriptor *getDataBuffer( void);

    Return Value

    A pointer to the IOMemoryDescriptor for the data buffer.

  • Declaration

    C++

    virtual bool initWithMemoryDescriptors( IOMemoryDescriptor *dataBuffer, IOMemoryDescriptor *controlBuffer, IOStreamBufferID bufferID = 0);

  • Declaration

    C++

    virtual SInt32 receiveClientReference( IOByteCount offset = 0, IOByteCount length = 0 );

    Parameters

    offset

    The offset in the buffer of the data from the client.

    length

    The length of the data from the client.

  • Declaration

    C++

    virtual SInt32 sendClientReference( IOByteCount offset = 0, IOByteCount length = 0 );

    Parameters

    offset

    The offset in the buffer of the data sent to the client.

    length

    The length of the data sent to the client.

    Return Value

    The new client reference count.

  • Sets the buffer identifier for the IOStreamBuffer object.

    Declaration

    C++

    virtual void setBufferID( IOStreamBufferID bufferID );

  • Sets the control buffer for the IOStreamBuffer object.

    Declaration

    C++

    virtual void setControlBuffer( IOMemoryDescriptor *controlBuffer);

  • Sets the data buffer for the IOStreamBuffer object.

    Declaration

    C++

    virtual void setDataBuffer( IOMemoryDescriptor *dataBuffer);

  • Declaration

    C++

    static IOStreamBuffer *withMemoryDescriptors( IOMemoryDescriptor *dataBuffer, IOMemoryDescriptor *controlBuffer, IOStreamBufferID bufferID = 0);