The C++ framework for developing highly scalable, high performance servers on Windows platforms.

IDatagramSocketConnectionManager Class Reference
[Datagram SocketsInterfacesProtected destructors on abstract base classes]

Inheritance diagram for IDatagramSocketConnectionManager:
Collaboration diagram for IDatagramSocketConnectionManager:

List of all members.


Detailed Description

An interface that is used to allow a socket to communicate with the connection manager that manages it. This interface is supplied to the socket in the call to Attach().

Public Member Functions

virtual void HandleOperation (IDatagramSocketEx &socket, JetByteTools::IO::CSmartBuffer &buffer, DWORD ioSize, DWORD lastError)=0
 Handles an I/O operation.
virtual void ReleaseSocket (IPoolableSocket &socket, bool wasUserSocket)=0
 Used to pass the socket back to the allocator when its reference count reaches 0.
virtual void RequestRead (IDatagramSocketEx &socket, JetByteTools::IO::CSmartBuffer &buffer)=0
virtual void RequestRecvFrom (IDatagramSocketEx &socket, JetByteTools::IO::CSmartBuffer &buffer)=0
virtual void RequestWrite (IDatagramSocketEx &socket, JetByteTools::IO::CSmartBuffer &buffer)=0
virtual void RequestSendTo (IDatagramSocketEx &socket, const IAddress &address, JetByteTools::IO::CSmartBuffer &buffer)=0
virtual void RequestCancelIO (IDatagramSocketEx &socket)=0
virtual
JetByteTools::IO::CSmartBuffer 
AllocateBuffer ()=0
 Allows the socket to access the buffer allocator that is being used by the manager so that it can generate write calls using the correct buffers. These write calls are the result of the non buffer based Write() and TryWrite(), etc methods being called.
virtual
JetByteTools::IO::CSmartBuffer 
AllocateCustomSizedBuffer (JetByteTools::IO::IBuffer::BufferSize bufferSize)=0
virtual
JetByteTools::IO::CSmartBuffer 
AllocateBuffer (JetByteTools::IO::IPoolBuffers &pool)=0
virtual void OnConnectionReset (IDatagramSocketEx &socket, DWORD lastError)=0
 Called by the socket when a OnConnectionConnectionReset event is detected. Allows the manager to dispatch the event to the thread pool so that it occurs when the socket is not holding its internal lock.
virtual void OnConnectionClosed (IDatagramSocketEx &socket, ConnectionClosureReason reason)=0
 Called by the socket when an OnConnectionClosed event is detected. Allows the manager to dispatch the event to the thread pool so that it occurs when the socket is not holding its internal lock.
virtual void OnConnectionShutdown (IDatagramSocketEx &, ShutdownHow)
 Called by the socket when the socket is shutdown. No need to implement for datagram sockets.
virtual void OnConnectionAborted (IDatagramSocketEx &, ConnectionClosureReason, const bool)
 Called when a socket is aborted due to the connection manager aborting all of its connections. No need to implement for datagram sockets.

Protected Member Functions

virtual ~IDatagramSocketConnectionManager ()
 We never delete instances of this interface; you must manage the lifetime of the class that implements it.

Constructor & Destructor Documentation

virtual ~IDatagramSocketConnectionManager (  )  [protected, virtual]

We never delete instances of this interface; you must manage the lifetime of the class that implements it.


Member Function Documentation

virtual void HandleOperation ( IDatagramSocketEx socket,
JetByteTools::IO::CSmartBuffer buffer,
DWORD  ioSize,
DWORD  lastError 
) [pure virtual]

Handles an I/O operation.

virtual void RequestRead ( IDatagramSocketEx socket,
JetByteTools::IO::CSmartBuffer buffer 
) [pure virtual]

virtual void RequestRecvFrom ( IDatagramSocketEx socket,
JetByteTools::IO::CSmartBuffer buffer 
) [pure virtual]

virtual void RequestWrite ( IDatagramSocketEx socket,
JetByteTools::IO::CSmartBuffer buffer 
) [pure virtual]

virtual void RequestSendTo ( IDatagramSocketEx socket,
const IAddress address,
JetByteTools::IO::CSmartBuffer buffer 
) [pure virtual]

virtual void RequestCancelIO ( IDatagramSocketEx socket  )  [pure virtual]

virtual JetByteTools::IO::CSmartBuffer AllocateBuffer (  )  [pure virtual]

Allows the socket to access the buffer allocator that is being used by the manager so that it can generate write calls using the correct buffers. These write calls are the result of the non buffer based Write() and TryWrite(), etc methods being called.

Implemented in TConnectionManagerBase< Base, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketConnectionManagerIO, JetByteTools::Socket::IDatagramSocketConnectionManagerCallback, JetByteTools::Socket::IAllocateDatagramSockets >.

virtual void OnConnectionReset ( IDatagramSocketEx socket,
DWORD  lastError 
) [pure virtual]

Called by the socket when a OnConnectionConnectionReset event is detected. Allows the manager to dispatch the event to the thread pool so that it occurs when the socket is not holding its internal lock.

virtual void OnConnectionClosed ( IDatagramSocketEx socket,
ConnectionClosureReason  reason 
) [pure virtual]

Called by the socket when an OnConnectionClosed event is detected. Allows the manager to dispatch the event to the thread pool so that it occurs when the socket is not holding its internal lock.

virtual void OnConnectionShutdown ( IDatagramSocketEx ,
ShutdownHow   
) [inline, virtual]

Called by the socket when the socket is shutdown. No need to implement for datagram sockets.

virtual void OnConnectionAborted ( IDatagramSocketEx ,
ConnectionClosureReason  ,
const   bool 
) [inline, virtual]

Called when a socket is aborted due to the connection manager aborting all of its connections. No need to implement for datagram sockets.


Generated on Sun Sep 12 19:10:19 2021 for The Server Framework - v7.4 by doxygen 1.5.3