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

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

Inheritance diagram for IDatagramServerSocketConnectionManager:
Collaboration diagram for IDatagramServerSocketConnectionManager:

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 (IDatagramServerSocketEx &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 (IDatagramServerSocketEx &socket, JetByteTools::IO::CSmartBuffer &buffer)=0
virtual void RequestWrite (IDatagramServerSocketEx &socket, JetByteTools::IO::CSmartBuffer &buffer)=0
virtual void RequestSendTo (IDatagramServerSocketEx &socket, const IAddress &address, JetByteTools::IO::CSmartBuffer &buffer)=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() 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 (IDatagramServerSocketEx &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 (IDatagramServerSocketEx &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 (IDatagramServerSocketEx &, ShutdownHow)
 Called by the socket when the socket is shutdown. No need to implement for datagram sockets.
virtual void OnConnectionAborted (IDatagramServerSocketEx &, 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 ~IDatagramServerSocketConnectionManager ()
 We never delete instances of this interface; you must manage the lifetime of the class that implements it.

Constructor & Destructor Documentation

virtual ~IDatagramServerSocketConnectionManager (  )  [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 ( IDatagramServerSocketEx socket,
JetByteTools::IO::CSmartBuffer buffer,
DWORD  ioSize,
DWORD  lastError 
) [pure virtual]

Handles an I/O operation.

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

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

virtual void RequestSendTo ( IDatagramServerSocketEx socket,
const IAddress address,
JetByteTools::IO::CSmartBuffer buffer 
) [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() methods being called.

Implemented in TConnectionManagerBase< Base, JetByteTools::Socket::IDatagramServerSocketConnectionManager, JetByteTools::Socket::IDatagramServerSocketConnectionManagerIO, JetByteTools::Socket::IDatagramSocketServerCallback, JetByteTools::Socket::IAllocateDatagramServerSockets >.

virtual void OnConnectionReset ( IDatagramServerSocketEx 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 ( IDatagramServerSocketEx 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 ( IDatagramServerSocketEx ,
ShutdownHow   
) [inline, virtual]

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

virtual void OnConnectionAborted ( IDatagramServerSocketEx ,
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:18 2021 for The Server Framework - v7.4 by doxygen 1.5.3