PTLib  Version 2.18.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PChannel::AsyncContext Class Reference

#include <channel.h>

Inheritance diagram for PChannel::AsyncContext:
Collaboration diagram for PChannel::AsyncContext:

Public Types

typedef void(PChannel::* CompletionFunction )(AsyncContext &)
 

Public Member Functions

 AsyncContext (void *buf=NULL, PINDEX len=0, const AsyncNotifier &notifier=AsyncNotifier())
 
void SetOffset (off_t offset)
 Set the offset to do the read/write operation. More...
 
 P_ALIGN_FIELD (CompletionFunction, m_onComplete, 16)
 
bool Initialise (PChannel *channel, CompletionFunction onComplete)
 
void OnIOComplete (PINDEX length, int errorNumber)
 

Public Attributes

void * m_buffer
 Pointer to a block of memory to receive the read bytes. More...
 
PINDEX m_length
 Maximum number of bytes to read into the buffer. More...
 
AsyncNotifier m_notifier
 Notification function for when asynchronous operation complete. More...
 
Errors m_errorCode
 Error returned after operation completed. More...
 
int m_errorNumber
 OS error returned after operation completed. More...
 
PChannelm_channel
 

Member Typedef Documentation

typedef void(PChannel::* PChannel::AsyncContext::CompletionFunction)(AsyncContext &)

Constructor & Destructor Documentation

PChannel::AsyncContext::AsyncContext ( void *  buf = NULL,
PINDEX  len = 0,
const AsyncNotifier notifier = AsyncNotifier() 
)

Member Function Documentation

bool PChannel::AsyncContext::Initialise ( PChannel channel,
CompletionFunction  onComplete 
)
void PChannel::AsyncContext::OnIOComplete ( PINDEX  length,
int  errorNumber 
)
PChannel::AsyncContext::P_ALIGN_FIELD ( CompletionFunction  ,
m_onComplete  ,
16   
)
void PChannel::AsyncContext::SetOffset ( off_t  offset)

Set the offset to do the read/write operation.

Member Data Documentation

void* PChannel::AsyncContext::m_buffer

Pointer to a block of memory to receive the read bytes.

PChannel* PChannel::AsyncContext::m_channel
Errors PChannel::AsyncContext::m_errorCode

Error returned after operation completed.

int PChannel::AsyncContext::m_errorNumber

OS error returned after operation completed.

PINDEX PChannel::AsyncContext::m_length

Maximum number of bytes to read into the buffer.

AsyncNotifier PChannel::AsyncContext::m_notifier

Notification function for when asynchronous operation complete.


The documentation for this class was generated from the following file: