Mac Developer Library

Developer

IOStreamBuffer Class Reference

Options
Deployment Target:

On This Page

IOStreamBuffer

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

  • Gets the buffer identifier for the IOStreamBuffer object.

    Declaration

    virtual IOStreamBufferID getBufferID( void);

    Discussion

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

  • Declaration

    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

    virtual IOMemoryDescriptor *getControlBuffer( void);

    Return Value

    A pointer to the IOMemoryDescriptor for the control buffer.

  • Declaration

    virtual IOMemoryDescriptor *getDataBuffer( void);

    Return Value

    A pointer to the IOMemoryDescriptor for the data buffer.

  • Declaration

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

  • Declaration

    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

    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

    virtual void setBufferID( IOStreamBufferID bufferID );

  • Sets the control buffer for the IOStreamBuffer object.

    Declaration

    virtual void setControlBuffer( IOMemoryDescriptor *controlBuffer);

  • Sets the data buffer for the IOStreamBuffer object.

    Declaration

    virtual void setDataBuffer( IOMemoryDescriptor *dataBuffer);

  • Declaration

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