Public Member Functions | |
CUDPConnectionCreator (JetByteTools::IO::IIOPool &pool, JetByteTools::Socket::IAllocateDatagramSockets &socketAllocator, JetByteTools::IO::IAllocateBuffers &bufferAllocator) | |
void | BeginShutdown () |
void | WaitForShutdownToComplete () |
bool | WaitForShutdownToComplete (Milliseconds timeout) |
JetByteTools::Socket::IDatagramSocket * | CreateConnection (const JetByteTools::Socket::IFullAddress &hostAddress, const JetByteTools::Socket::IFullAddress &remoteAddress, Callback &callback) override |
virtual JetByteTools::Socket::IDatagramSocket * | CreateConnection (const JetByteTools::Socket::IFullAddress &hostAddress, const JetByteTools::Socket::IFullAddress &remoteAddress, Callback &callback)=0 |
Protected Member Functions | |
void | OnReadCompleted (JetByteTools::Socket::IDatagramSocket &socket, JetByteTools::IO::CSmartBuffer &buffer) override |
Called when an asynchronous read completes. This is where you are given the data that has been received on the connection and where your business logic would usually be expected to start dealing with the data. You are generally expected to issue another Read() before this call completes, if you don't and don't increase the reference count of the socket in some other way then the socket will close automatically. | |
void | OnReadCompletionError (JetByteTools::Socket::IDatagramSocket &socket, JetByteTools::IO::CSmartBuffer &buffer, DWORD lastError) override |
Called when an asynchronous read completes with an error. | |
void | OnConnectionClosure (JetByteTools::Socket::IDatagramSocket &socket, JetByteTools::Socket::ConnectionClosureReason reason) override |
Called when the connection is closed. |
CUDPConnectionCreator | ( | JetByteTools::IO::IIOPool & | pool, | |
JetByteTools::Socket::IAllocateDatagramSockets & | socketAllocator, | |||
JetByteTools::IO::IAllocateBuffers & | bufferAllocator | |||
) |
void BeginShutdown | ( | ) |
void WaitForShutdownToComplete | ( | ) |
bool WaitForShutdownToComplete | ( | Milliseconds | timeout | ) |
IDatagramSocket * CreateConnection | ( | const JetByteTools::Socket::IFullAddress & | hostAddress, | |
const JetByteTools::Socket::IFullAddress & | remoteAddress, | |||
Callback & | callback | |||
) | [override] |
void OnReadCompleted | ( | JetByteTools::Socket::IDatagramSocket & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer | |||
) | [override, protected, virtual] |
Called when an asynchronous read completes. This is where you are given the data that has been received on the connection and where your business logic would usually be expected to start dealing with the data. You are generally expected to issue another Read() before this call completes, if you don't and don't increase the reference count of the socket in some other way then the socket will close automatically.
Reimplemented from CDatagramSocketConnectionManagerCallback.
void OnReadCompletionError | ( | JetByteTools::Socket::IDatagramSocket & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer, | |||
DWORD | lastError | |||
) | [override, protected, virtual] |
Called when an asynchronous read completes with an error.
Reimplemented from CDatagramSocketConnectionManagerCallback.
void OnConnectionClosure | ( | JetByteTools::Socket::IDatagramSocket & | socket, | |
JetByteTools::Socket::ConnectionClosureReason | reason | |||
) | [override, protected, virtual] |
virtual JetByteTools::Socket::IDatagramSocket* CreateConnection | ( | const JetByteTools::Socket::IFullAddress & | hostAddress, | |
const JetByteTools::Socket::IFullAddress & | remoteAddress, | |||
Callback & | callback | |||
) | [pure virtual, inherited] |