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

CSequencedStreamSocketAllocator Class Reference

Inheritance diagram for CSequencedStreamSocketAllocator:
Collaboration diagram for CSequencedStreamSocketAllocator:

List of all members.

Public Types

typedef
CSocketAllocator::SocketCount 
SocketCount

Public Member Functions

 CSequencedStreamSocketAllocator (SocketCount maxFreeSockets, JetByteTools::Socket::PerSocketBufferPoolingLimit maxPooledBuffers, JetByteTools::Socket::ConsecutiveSocketOperations maxConsecutiveOperations, bool log=true)
 CSequencedStreamSocketAllocator (JetByteTools::Socket::IMonitorSocketAllocation &monitor, SocketCount maxFreeSockets, JetByteTools::Socket::PerSocketBufferPoolingLimit maxPooledBuffers, JetByteTools::Socket::ConsecutiveSocketOperations maxConsecutiveOperations, bool log=true)
 CSequencedStreamSocketAllocator (const CSequencedStreamSocketAllocator &rhs)
 ~CSequencedStreamSocketAllocator ()
CSequencedStreamSocketAllocatoroperator= (const CSequencedStreamSocketAllocator &rhs)
IPoolableStreamSocket & AllocateSocket (IPoolableSocketManager &manager, ISocketCallback &callback, SOCKET theSocket) override
SequenceId RequestSequenceId (const JetByteTools::Core::_tstring &sequenceName) override
void ReleaseSocket (IPoolableSocket &socket) override
 Release the supplied socket and, either return it to the pool for later reuse or destroy it.
JetByteTools::Core::IIndexedOpaqueUserData::UserDataIndex RequestUserDataSlot (const JetByteTools::Core::_tstring &name) override
 Implement IProvideUserData.
JetByteTools::Core::IIndexedOpaqueUserData::UserDataIndex LockUserDataSlots () override
DWORD AbortMyConnections (const IPoolableSocketManager &manager, ConnectionClosureReason reason) override
 Walk the list of active connections and abort any that are managed by the supplied manager. Returns the number of active connections that were aborted. Note that the allocator can support more than max(SocketCount) active connections; the size of SocketCount only limits the number of pooled connections.
void DumpMyConnections (const IPoolableSocketManager &manager) const override
bool ReleaseSockets () override
 Forcibly release, and destroy, all active and inactive sockets. Use with care and only in a debugging/system shutdown scenario.

Protected Member Functions

SocketCount EnlargePool (SocketCount socketsToAdd)
 Create socketsToAdd sockets and add them to the pool. Returns the number of sockets now in the pool.
IPoolableSocket & AllocatePoolableSocket (IPoolableSocketManager &manager, ISocketCallback &callback, SOCKET theSocket)
 Allocate an instance of IPoolableSocket which has the supplied manager as its manager, the supplied callback interface for callbacks and which is attached to the supplied SOCKET.

Static Protected Attributes

static const SocketCount NoPooledSockets = 0xFFFF
 Pass this value as maxFreeSockets to constructors to create an allocator that doesn't pool sockets at all.


Member Typedef Documentation

Reimplemented from CSocketAllocator.


Constructor & Destructor Documentation


Member Function Documentation

IPoolableStreamSocket & AllocateSocket ( IPoolableSocketManager manager,
ISocketCallback callback,
SOCKET  theSocket 
) [override, inherited]

SequenceId RequestSequenceId ( const JetByteTools::Core::_tstring sequenceName  )  [override, inherited]

void ReleaseSocket ( IPoolableSocket socket  )  [inline, override, virtual, inherited]

Release the supplied socket and, either return it to the pool for later reuse or destroy it.

Reimplemented from CSocketAllocator.

JetByteTools::Core::IIndexedOpaqueUserData::UserDataIndex RequestUserDataSlot ( const JetByteTools::Core::_tstring name  )  [inline, override, virtual, inherited]

Implement IProvideUserData.

Reimplemented from CSocketAllocator.

JetByteTools::Core::IIndexedOpaqueUserData::UserDataIndex LockUserDataSlots (  )  [inline, override, virtual, inherited]

Reimplemented from CSocketAllocator.

DWORD AbortMyConnections ( const IPoolableSocketManager manager,
ConnectionClosureReason  reason 
) [inline, override, virtual, inherited]

Walk the list of active connections and abort any that are managed by the supplied manager. Returns the number of active connections that were aborted. Note that the allocator can support more than max(SocketCount) active connections; the size of SocketCount only limits the number of pooled connections.

Reimplemented from CSocketAllocator.

void DumpMyConnections ( const IPoolableSocketManager manager  )  const [inline, override, virtual, inherited]

Reimplemented from CSocketAllocator.

bool ReleaseSockets (  )  [inline, override, virtual, inherited]

Forcibly release, and destroy, all active and inactive sockets. Use with care and only in a debugging/system shutdown scenario.

Reimplemented from CSocketAllocator.

CSocketAllocator::SocketCount EnlargePool ( SocketCount  socketsToAdd  )  [protected, inherited]

Create socketsToAdd sockets and add them to the pool. Returns the number of sockets now in the pool.

IPoolableSocket & AllocatePoolableSocket ( IPoolableSocketManager manager,
ISocketCallback callback,
SOCKET  theSocket 
) [protected, inherited]

Allocate an instance of IPoolableSocket which has the supplied manager as its manager, the supplied callback interface for callbacks and which is attached to the supplied SOCKET.


Member Data Documentation

const CSocketAllocator::SocketCount NoPooledSockets = 0xFFFF [static, inherited]

Pass this value as maxFreeSockets to constructors to create an allocator that doesn't pool sockets at all.


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