ADC Home > Reference Library > Reference > Darwin > Kernel Framework Reference

 


IOStreamBuffer

Inherits from:
Declared In:

Overview

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



Functions

getBufferID

Gets the buffer identifier for the IOStreamBuffer object.

getClientReferenceCount
getControlBuffer
getDataBuffer
initWithMemoryDescriptors
receiveClientReference
sendClientReference
setBufferID

Sets the buffer identifier for the IOStreamBuffer object.

setControlBuffer

Sets the control buffer for the IOStreamBuffer object.

setDataBuffer

Sets the data buffer for the IOStreamBuffer object.

withMemoryDescriptors

getBufferID


Gets the buffer identifier for the IOStreamBuffer object.

public

virtual IOStreamBufferID getBufferID( void);
Discussion

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


getClientReferenceCount


public

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


public

virtual IOMemoryDescriptor *getControlBuffer( void);
Return Value

A pointer to the IOMemoryDescriptor for the control buffer.


getDataBuffer


public

virtual IOMemoryDescriptor *getDataBuffer( void);
Return Value

A pointer to the IOMemoryDescriptor for the data buffer.


initWithMemoryDescriptors


public

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


receiveClientReference


public

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


public

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.

public

virtual void setBufferID( IOStreamBufferID bufferID );


setControlBuffer


Sets the control buffer for the IOStreamBuffer object.

public

virtual void setControlBuffer( IOMemoryDescriptor *controlBuffer);


setDataBuffer


Sets the data buffer for the IOStreamBuffer object.

public

virtual void setDataBuffer( IOMemoryDescriptor *dataBuffer);


withMemoryDescriptors


public

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


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.

 

Last Updated: 2008-12-19