IOStreamBuffer

Inherits from
OSObject
Availability
Available in OS X v10.5 and later.
Declared in
IOStream.h

Overview

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

Tasks

Miscellaneous

Instance Methods

getBufferID

Gets the buffer identifier for the IOStreamBuffer object.

virtual IOStreamBufferID getBufferID( void);
Discussion

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

getClientReferenceCount

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.

getControlBuffer

virtual IOMemoryDescriptor *getControlBuffer( void);
Return Value

A pointer to the IOMemoryDescriptor for the control buffer.

getDataBuffer

virtual IOMemoryDescriptor *getDataBuffer( void);
Return Value

A pointer to the IOMemoryDescriptor for the data buffer.

initWithMemoryDescriptors

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

receiveClientReference

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.

sendClientReference

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.

setBufferID

Sets the buffer identifier for the IOStreamBuffer object.

virtual void setBufferID( IOStreamBufferID bufferID );

setControlBuffer

Sets the control buffer for the IOStreamBuffer object.

virtual void setControlBuffer( IOMemoryDescriptor *controlBuffer);

setDataBuffer

Sets the data buffer for the IOStreamBuffer object.

virtual void setDataBuffer( IOMemoryDescriptor *dataBuffer);

withMemoryDescriptors

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