PTLib Version 2.12.9

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | List of all members
PChannel::AsyncContext Class Reference

`#include <channel.h>`

Inheritance diagram for PChannel::AsyncContext:
[legend]
Collaboration diagram for PChannel::AsyncContext:
[legend]

## 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...
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...
PChannel * | m_channel
CompletionFunction | m_onComplete

## 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
| ) |  |

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.

CompletionFunction PChannel::AsyncContext::m_onComplete

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

- channel.h