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

TStreamSocketConnectionManager Class Template Reference
[Stream SocketsConnection managers]

Inheritance diagram for TStreamSocketConnectionManager:
Collaboration diagram for TStreamSocketConnectionManager:

List of all members.


Detailed Description

template<class Base>
class JetByteTools::Socket::TStreamSocketConnectionManager< Base >

A connection manager for stream sockets.

Public Member Functions

 TStreamSocketConnectionManager (IStreamSocketConnectionManagerCallback &callback, JetByteTools::IO::IIOPool &pool, IAllocateStreamSockets &socketAllocator, JetByteTools::IO::IAllocateBuffers &bufferAllocator, ZeroByteReadConfiguration zeroByteReadConfiguration=NoZeroByteRead, ILimitConnections &connectionLimiter=CConnectionLimiter::NoLimitLimiter, OutOfBandDataReadConfiguration outOfBandDataReadConfiguration=NoOutOfBandData)
 Construct a connection manager with the supplied callback interface, I/O pool, allocators and connection limiter.
 TStreamSocketConnectionManager (const IFullAddress &outboundAddress, IStreamSocketConnectionManagerCallback &callback, JetByteTools::IO::IIOPool &pool, IAllocateStreamSockets &socketAllocator, JetByteTools::IO::IAllocateBuffers &bufferAllocator, ZeroByteReadConfiguration zeroByteReadConfiguration=NoZeroByteRead, ILimitConnections &connectionLimiter=CConnectionLimiter::NoLimitLimiter, OutOfBandDataReadConfiguration outOfBandDataReadConfiguration=NoOutOfBandData)
 TStreamSocketConnectionManager (const TStreamSocketConnectionManager &rhs)
virtual ~TStreamSocketConnectionManager ()
TStreamSocketConnectionManageroperator= (const TStreamSocketConnectionManager &rhs)
virtual
CSmartStreamSocket 
Connect (const IFullAddress &address, const void *pUserData=nullptr, SocketBufferSize recvBufferSize=DefaultSocketBufferSize, SocketBufferSize sendBufferSize=DefaultSocketBufferSize)
virtual
CSmartStreamSocket 
ConnectNoThrow (const IFullAddress &address, const void *pUserData=nullptr, SocketBufferSize recvBufferSize=DefaultSocketBufferSize, SocketBufferSize sendBufferSize=DefaultSocketBufferSize)
virtual
CSmartStreamSocket 
AsyncConnect (const IFullAddress &address, const void *pUserData=nullptr, SocketBufferSize recvBufferSize=DefaultSocketBufferSize, SocketBufferSize sendBufferSize=DefaultSocketBufferSize)
virtual
CSmartStreamSocket 
AsyncConnectNoThrow (const IFullAddress &address, const void *pUserData=nullptr, SocketBufferSize recvBufferSize=DefaultSocketBufferSize, SocketBufferSize sendBufferSize=DefaultSocketBufferSize)
virtual
CSmartStreamSocket 
ConnectAsyncIfAvailable (const IFullAddress &address, const void *pUserData=nullptr, SocketBufferSize recvBufferSize=DefaultSocketBufferSize, SocketBufferSize sendBufferSize=DefaultSocketBufferSize)
virtual
CSmartStreamSocket 
ConnectAsyncIfAvailableNoThrow (const IFullAddress &address, const void *pUserData=nullptr, SocketBufferSize recvBufferSize=DefaultSocketBufferSize, SocketBufferSize sendBufferSize=DefaultSocketBufferSize)
bool AsyncConnectAvailable (const IAddressType &addressType) const override
DWORD AbortAllConnections ()
 Aborts all active sockets that are managed by the supplied manager and returns the number of active sockets that were aborted.
virtual void BeginShutdown ()
 Starts the shutdown process and returns immediately.
virtual void WaitForShutdownToComplete ()
 Initiates a shutdown (if one isn't already in progresss) and then waits for it to complete. Does not return until the shutdown has completed.
virtual bool WaitForShutdownToComplete (Milliseconds timeout)
 Initiates a shutdown (if one isn't already in progresss) and then waits for the supplied number of milliseconds for it to complete. Returns true if the shutdown completed successfully before the timeout expired and false if it didn't.
virtual void ForceShutdown ()
 Force a shutdown to occur, this is DANGEROUS to use as it can result in a shutdown of this object, and its potential destruction, whilst there are sockets alive that may call back into this object. Use with care!

Protected Member Functions

void ConnectionEstablished (IStreamSocketEx &socket, const IAddress &address)
CSmartStreamSocket Connect (const IFullAddress &address, const void *pUserData, const void *pFilterData, SocketBufferSize recvBufferSize, SocketBufferSize sendBufferSize)
CSmartStreamSocket ConnectNoThrow (const IFullAddress &address, const void *pUserData, const void *pFilterData, SocketBufferSize recvBufferSize, SocketBufferSize sendBufferSize)
CSmartStreamSocket AsyncConnect (const IFullAddress &address, const void *pUserData, const void *pFilterData, SocketBufferSize recvBufferSize, SocketBufferSize sendBufferSize)
CSmartStreamSocket AsyncConnectNoThrow (const IFullAddress &address, const void *pUserData, const void *pFilterData, SocketBufferSize recvBufferSize, SocketBufferSize sendBufferSize)
CSmartStreamSocket ConnectAsyncIfAvailable (const IFullAddress &address, const void *pUserData, const void *pFilterData, SocketBufferSize recvBufferSize, SocketBufferSize sendBufferSize)
CSmartStreamSocket ConnectAsyncIfAvailableNoThrow (const IFullAddress &address, const void *pUserData, const void *pFilterData, SocketBufferSize recvBufferSize, SocketBufferSize sendBufferSize)
void JoinIOPoolLogicalThreadGroup () const
void PostIoOperationOnHandler (JetByteTools::IO::IHandler &handler, JetByteTools::IO::CSmartBuffer &buffer, DWORD operation, bool forceDispatchToPool=false)
void IssueRead (IStreamSocketEx &socket, JetByteTools::IO::CSmartBuffer &buffer) override
void IssueWrite (IStreamSocketEx &socket, JetByteTools::IO::CSmartBuffer &buffer) override
void HandleOperation (IStreamSocketEx &socket, JetByteTools::IO::CSmartBuffer &buffer, DWORD ioSize, DWORD lastError) override
void RequestRead (IStreamSocketEx &socket, JetByteTools::IO::CSmartBuffer &buffer) override
void RequestWrite (IStreamSocketEx &socket, JetByteTools::IO::CSmartBuffer &buffer) override
void RequestWrite (IStreamSocketEx &socket, JetByteTools::IO::IIterateableBufferChain &buffers) override
void ExecuteWrite (IStreamSocketEx &socket, JetByteTools::IO::CSmartBuffer &buffer) override
void OnClientClose (IStreamSocketEx &socket) override
void OnConnectionReset (IStreamSocketEx &socket, DWORD lastError) override
void OnConnectionClosed (IStreamSocketEx &socket, ConnectionClosureReason reason) override
void OnConnectionShutdown (IStreamSocketEx &socket, ShutdownHow how) override
void OnConnectionAborted (IStreamSocketEx &socket, ConnectionClosureReason reason, bool wasUserSocket) override
void RequestCancelIO (IStreamSocketEx &socket) override
CSmartStreamSocketEx AllocateSocket (SOCKET theSocket)
SOCKET CreateSocket (const IAddressType &addressType, SocketBufferSize recvBufferSize, SocketBufferSize sendBufferSize) const
void IssueReadOOBIfRequired (IStreamSocketEx &socket)
void IssueReadOOBIfRequired (IStreamSocketEx &socket, JetByteTools::IO::CSmartBuffer &buffer)
DWORD AbortAllConnections (ConnectionClosureReason reason)
bool ShutdownIsInProgress () const
virtual void Start ()
void EnsureCanConnectNow ()
bool CheckCanConnectNow ()
void AssociateDevice (SOCKET s, JetByteTools::IO::IHandler &handler) const
JetByteTools::IO::CSmartBuffer AllocateBuffer () override
JetByteTools::IO::CSmartBuffer AllocateBuffer (JetByteTools::IO::IPoolBuffers &pool) override
JetByteTools::IO::CSmartBuffer AllocateCustomSizedBuffer (JetByteTools::IO::IBuffer::BufferSize bufferSize) override
void IncrementActiveConnections ()
void DecrementActiveConnections ()
virtual void ReleaseSocket (IPoolableSocket &socket, bool wasUserSocket) override
virtual void ShutdownComplete ()
void SetBufferSize (SOCKET s, SocketBufferSize bufferSize, int optionName) const
bool ConnectEx (SOCKET s, const struct sockaddr FAR *name, int namelen, PVOID lpSendBuffer, DWORD dwSendDataLength, LPDWORD lpdwBytesSent, LPOVERLAPPED lpOverlapped) const
 Loads, if necessary and available, and then calls ConnectEx(). If the function isn't available then an exception is thrown.
bool LoadConnectEx (SOCKET s) const
 Attempts to load ConnectEx() via a call to WSAIoctl(). Returns true if successful.
bool AcceptEx (SOCKET listenSocket, SOCKET acceptSocket, PVOID pOutputBuffer, DWORD receiveDataLength, DWORD localAddressLength, DWORD remoteAddressLength, LPDWORD bytesReceived, LPOVERLAPPED pOverlapped) const
 Loads, if necessary and available, and then calls AcceptEx(). If the function isn't available then an exception is thrown.
bool LoadAcceptEx (SOCKET s) const
 Attempts to load AcceptEx() via a call to WSAIoctl(). Returns true if successful.
void GetAcceptExSockaddrs (PVOID pOutputBuffer, DWORD receiveDataLength, DWORD localAddressLength, DWORD remoteAddressLength, LPSOCKADDR *pLocalSockaddr, LPINT pLocalSockaddrLength, LPSOCKADDR *pRemoteSockaddr, LPINT pRemoteSockaddrLength) const
 Loads, if necessary and available, and then calls GetAcceptExSockaddrs(). If the function isn't available then an exception is thrown.
bool LoadGetAcceptExSockaddrs (SOCKET s) const
 Attempts to load GetAcceptExSockaddrs() via a call to WSAIoctl(). Returns true if successful.
bool DisconnectEx (SOCKET s, LPOVERLAPPED pOverlapped, DWORD flags) const
 Loads, if necessary and available, and then calls DisconnectEx(). If the function isn't available then an exception is thrown.
bool LoadDisconnectEx (SOCKET s) const
 Attempts to load DisconnectEx() via a call to WSAIoctl(). Returns true if successful.
bool TransmitFile (SOCKET s, HANDLE fileToTransmit, DWORD numberOfBytesToWrite, DWORD numberOfBytesPerSend, LPOVERLAPPED lOverlapped, LPTRANSMIT_FILE_BUFFERS lTransmitBuffers, DWORD flags) const
 Loads, if necessary and available, and then calls TransmitFile(). If the function isn't available then an exception is thrown.
bool LoadTransmitFile (SOCKET s) const
 Attempts to load TransmitFile() via a call to WSAIoctl(). Returns true if successful.
bool DisconnectSocketForReuse (SOCKET s) const
 Attempts to disconnect a socket for reuse first by attempting to call DisconnectEx() and then by attempting to call TransmitFile() in 'disconnect for reuse mode' see http://msdn2.microsoft.com/en-us/library/ms740565.aspx for details. If neither option is available then an exception is thrown.
bool CanDisconnectSocketForReuse (SOCKET s) const
 Returns true if either DisconnectEx() or TransmitFile() can be a call to WSAIoctl().
int WSARecvMsg (SOCKET s, LPWSAMSG lpMsg, LPDWORD lpdwNumberOfBytesRecvd, LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine) const
 Loads, if necessary and available, and then calls WSARecvMsg(). If the function isn't available then an exception is thrown.
bool LoadWSARecvMsg (SOCKET s) const
 Attempts to load WSARecvMsg() via a call to WSAIoctl(). Returns true if successful.
void EnableDispatchOnThisThread (bool enable)

Static Protected Member Functions

static bool ShouldDispatchOnThisThread ()
static bool ShouldDispatchForThisSocket (const void *pSocket)
static const void * EnableDispatchForThisSocket (const void *pSocket)
static void DisableDispatchForThisSocket (const void *pSocket)

Protected Attributes

JetByteTools::IO::IIOPoolm_pool
SocketAllocator & m_socketAllocator
ILimitConnectionsm_connectionLimiter
JetByteTools::Core::CManualResetEvent m_noActiveConnectionsEvent
JetByteTools::Core::CAtomicCounter m_activeConnections
const bool m_canEnableSkipCompletionPortOnSuccess

Constructor & Destructor Documentation

TStreamSocketConnectionManager ( IStreamSocketConnectionManagerCallback callback,
JetByteTools::IO::IIOPool pool,
IAllocateStreamSockets socketAllocator,
JetByteTools::IO::IAllocateBuffers bufferAllocator,
ZeroByteReadConfiguration  zeroByteReadConfiguration = NoZeroByteRead,
ILimitConnections connectionLimiter = CConnectionLimiter::NoLimitLimiter,
OutOfBandDataReadConfiguration  outOfBandDataReadConfiguration = NoOutOfBandData 
) [inline]

Construct a connection manager with the supplied callback interface, I/O pool, allocators and connection limiter.

TStreamSocketConnectionManager ( const IFullAddress outboundAddress,
IStreamSocketConnectionManagerCallback callback,
JetByteTools::IO::IIOPool pool,
IAllocateStreamSockets socketAllocator,
JetByteTools::IO::IAllocateBuffers bufferAllocator,
ZeroByteReadConfiguration  zeroByteReadConfiguration = NoZeroByteRead,
ILimitConnections connectionLimiter = CConnectionLimiter::NoLimitLimiter,
OutOfBandDataReadConfiguration  outOfBandDataReadConfiguration = NoOutOfBandData 
) [inline]

~TStreamSocketConnectionManager (  )  [inline, virtual]


Member Function Documentation

CSmartStreamSocket Connect ( const IFullAddress address,
const void *  pUserData = nullptr,
SocketBufferSize  recvBufferSize = DefaultSocketBufferSize,
SocketBufferSize  sendBufferSize = DefaultSocketBufferSize 
) [inline, virtual]

CSmartStreamSocket ConnectNoThrow ( const IFullAddress address,
const void *  pUserData = nullptr,
SocketBufferSize  recvBufferSize = DefaultSocketBufferSize,
SocketBufferSize  sendBufferSize = DefaultSocketBufferSize 
) [inline, virtual]

CSmartStreamSocket AsyncConnect ( const IFullAddress address,
const void *  pUserData = nullptr,
SocketBufferSize  recvBufferSize = DefaultSocketBufferSize,
SocketBufferSize  sendBufferSize = DefaultSocketBufferSize 
) [inline, virtual]

CSmartStreamSocket AsyncConnectNoThrow ( const IFullAddress address,
const void *  pUserData = nullptr,
SocketBufferSize  recvBufferSize = DefaultSocketBufferSize,
SocketBufferSize  sendBufferSize = DefaultSocketBufferSize 
) [inline, virtual]

CSmartStreamSocket ConnectAsyncIfAvailable ( const IFullAddress address,
const void *  pUserData = nullptr,
SocketBufferSize  recvBufferSize = DefaultSocketBufferSize,
SocketBufferSize  sendBufferSize = DefaultSocketBufferSize 
) [inline, virtual]

CSmartStreamSocket ConnectAsyncIfAvailableNoThrow ( const IFullAddress address,
const void *  pUserData = nullptr,
SocketBufferSize  recvBufferSize = DefaultSocketBufferSize,
SocketBufferSize  sendBufferSize = DefaultSocketBufferSize 
) [inline, virtual]

bool AsyncConnectAvailable ( const IAddressType addressType  )  const [inline, override]

void ConnectionEstablished ( IStreamSocketEx socket,
const IAddress address 
) [inline, protected]

CSmartStreamSocket Connect ( const IFullAddress address,
const void *  pUserData,
const void *  pFilterData,
SocketBufferSize  recvBufferSize,
SocketBufferSize  sendBufferSize 
) [inline, protected]

CSmartStreamSocket ConnectNoThrow ( const IFullAddress address,
const void *  pUserData,
const void *  pFilterData,
SocketBufferSize  recvBufferSize,
SocketBufferSize  sendBufferSize 
) [inline, protected]

CSmartStreamSocket AsyncConnect ( const IFullAddress address,
const void *  pUserData,
const void *  pFilterData,
SocketBufferSize  recvBufferSize,
SocketBufferSize  sendBufferSize 
) [inline, protected]

CSmartStreamSocket AsyncConnectNoThrow ( const IFullAddress address,
const void *  pUserData,
const void *  pFilterData,
SocketBufferSize  recvBufferSize,
SocketBufferSize  sendBufferSize 
) [inline, protected]

CSmartStreamSocket ConnectAsyncIfAvailable ( const IFullAddress address,
const void *  pUserData,
const void *  pFilterData,
SocketBufferSize  recvBufferSize,
SocketBufferSize  sendBufferSize 
) [inline, protected]

CSmartStreamSocket ConnectAsyncIfAvailableNoThrow ( const IFullAddress address,
const void *  pUserData,
const void *  pFilterData,
SocketBufferSize  recvBufferSize,
SocketBufferSize  sendBufferSize 
) [inline, protected]

void JoinIOPoolLogicalThreadGroup (  )  const [inline, protected]

void PostIoOperationOnHandler ( JetByteTools::IO::IHandler handler,
JetByteTools::IO::CSmartBuffer buffer,
DWORD  operation,
bool  forceDispatchToPool = false 
) [inline, protected]

void IssueRead ( IStreamSocketEx socket,
JetByteTools::IO::CSmartBuffer buffer 
) [inline, override, protected, virtual]

void IssueWrite ( IStreamSocketEx socket,
JetByteTools::IO::CSmartBuffer buffer 
) [inline, override, protected, virtual]

void HandleOperation ( IStreamSocketEx socket,
JetByteTools::IO::CSmartBuffer buffer,
DWORD  ioSize,
DWORD  lastError 
) [inline, override, protected]

void RequestRead ( IStreamSocketEx socket,
JetByteTools::IO::CSmartBuffer buffer 
) [inline, override, protected]

void RequestWrite ( IStreamSocketEx socket,
JetByteTools::IO::CSmartBuffer buffer 
) [inline, override, protected]

void RequestWrite ( IStreamSocketEx socket,
JetByteTools::IO::IIterateableBufferChain buffers 
) [inline, override, protected]

void ExecuteWrite ( IStreamSocketEx socket,
JetByteTools::IO::CSmartBuffer buffer 
) [inline, override, protected]

void OnClientClose ( IStreamSocketEx socket  )  [inline, override, protected]

void OnConnectionReset ( IStreamSocketEx socket,
DWORD  lastError 
) [inline, override, protected]

void OnConnectionClosed ( IStreamSocketEx socket,
ConnectionClosureReason  reason 
) [inline, override, protected]

void OnConnectionShutdown ( IStreamSocketEx socket,
ShutdownHow  how 
) [inline, override, protected]

void OnConnectionAborted ( IStreamSocketEx socket,
ConnectionClosureReason  reason,
bool  wasUserSocket 
) [inline, override, protected]

void RequestCancelIO ( IStreamSocketEx socket  )  [inline, override, protected]

CSmartStreamSocketEx AllocateSocket ( SOCKET  theSocket  )  [inline, protected]

SOCKET CreateSocket ( const IAddressType addressType,
SocketBufferSize  recvBufferSize,
SocketBufferSize  sendBufferSize 
) const [inline, protected]

void IssueReadOOBIfRequired ( IStreamSocketEx socket  )  [inline, protected]

void IssueReadOOBIfRequired ( IStreamSocketEx socket,
JetByteTools::IO::CSmartBuffer buffer 
) [inline, protected]

DWORD AbortAllConnections (  )  [inline, inherited]

Aborts all active sockets that are managed by the supplied manager and returns the number of active sockets that were aborted.

DWORD AbortAllConnections ( ConnectionClosureReason  reason  )  [inline, protected, inherited]

void BeginShutdown (  )  [inline, virtual, inherited]

void WaitForShutdownToComplete (  )  [inline, virtual, inherited]

Initiates a shutdown (if one isn't already in progresss) and then waits for it to complete. Does not return until the shutdown has completed.

Reimplemented in TDatagramSocketServer, and TStreamSocketServerEx< TStreamSocketConnectionManager< CFilteringStreamSocketConnectionManagerBase > >.

bool WaitForShutdownToComplete ( Milliseconds  timeout  )  [inline, virtual, inherited]

Initiates a shutdown (if one isn't already in progresss) and then waits for the supplied number of milliseconds for it to complete. Returns true if the shutdown completed successfully before the timeout expired and false if it didn't.

Reimplemented in TDatagramSocketServer, and TStreamSocketServerEx< TStreamSocketConnectionManager< CFilteringStreamSocketConnectionManagerBase > >.

void ForceShutdown (  )  [inline, virtual, inherited]

Force a shutdown to occur, this is DANGEROUS to use as it can result in a shutdown of this object, and its potential destruction, whilst there are sockets alive that may call back into this object. Use with care!

Reimplemented in TDatagramSocketServer, and TStreamSocketServerEx< TStreamSocketConnectionManager< CFilteringStreamSocketConnectionManagerBase > >.

bool ShutdownIsInProgress (  )  const [inline, protected, inherited]

void Start (  )  [inline, protected, virtual, inherited]

void EnsureCanConnectNow (  )  [inline, protected, inherited]

bool CheckCanConnectNow (  )  [inline, protected, inherited]

void AssociateDevice ( SOCKET  s,
JetByteTools::IO::IHandler handler 
) const [inline, protected, inherited]

JetByteTools::IO::CSmartBuffer AllocateBuffer (  )  [inline, override, protected, inherited]

JetByteTools::IO::CSmartBuffer AllocateBuffer ( JetByteTools::IO::IPoolBuffers pool  )  [inline, override, protected, inherited]

JetByteTools::IO::CSmartBuffer AllocateCustomSizedBuffer ( JetByteTools::IO::IBuffer::BufferSize  bufferSize  )  [inline, override, protected, inherited]

void IncrementActiveConnections (  )  [inline, protected, inherited]

void DecrementActiveConnections (  )  [inline, protected, inherited]

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

void ShutdownComplete (  )  [inline, protected, virtual, inherited]

void SetBufferSize ( SOCKET  s,
SocketBufferSize  bufferSize,
int  optionName 
) const [inline, protected, inherited]

bool ConnectEx ( SOCKET  s,
const struct sockaddr FAR *  name,
int  namelen,
PVOID  lpSendBuffer,
DWORD  dwSendDataLength,
LPDWORD  lpdwBytesSent,
LPOVERLAPPED  lpOverlapped 
) const [inherited]

Loads, if necessary and available, and then calls ConnectEx(). If the function isn't available then an exception is thrown.

bool LoadConnectEx ( SOCKET  s  )  const [inherited]

Attempts to load ConnectEx() via a call to WSAIoctl(). Returns true if successful.

bool AcceptEx ( SOCKET  listenSocket,
SOCKET  acceptSocket,
PVOID  pOutputBuffer,
DWORD  receiveDataLength,
DWORD  localAddressLength,
DWORD  remoteAddressLength,
LPDWORD  bytesReceived,
LPOVERLAPPED  pOverlapped 
) const [inherited]

Loads, if necessary and available, and then calls AcceptEx(). If the function isn't available then an exception is thrown.

bool LoadAcceptEx ( SOCKET  s  )  const [inherited]

Attempts to load AcceptEx() via a call to WSAIoctl(). Returns true if successful.

void GetAcceptExSockaddrs ( PVOID  pOutputBuffer,
DWORD  receiveDataLength,
DWORD  localAddressLength,
DWORD  remoteAddressLength,
LPSOCKADDR *  pLocalSockaddr,
LPINT  pLocalSockaddrLength,
LPSOCKADDR *  pRemoteSockaddr,
LPINT  pRemoteSockaddrLength 
) const [inherited]

Loads, if necessary and available, and then calls GetAcceptExSockaddrs(). If the function isn't available then an exception is thrown.

bool LoadGetAcceptExSockaddrs ( SOCKET  s  )  const [inherited]

Attempts to load GetAcceptExSockaddrs() via a call to WSAIoctl(). Returns true if successful.

bool DisconnectEx ( SOCKET  s,
LPOVERLAPPED  pOverlapped,
DWORD  flags 
) const [inherited]

Loads, if necessary and available, and then calls DisconnectEx(). If the function isn't available then an exception is thrown.

bool LoadDisconnectEx ( SOCKET  s  )  const [inherited]

Attempts to load DisconnectEx() via a call to WSAIoctl(). Returns true if successful.

bool TransmitFile ( SOCKET  s,
HANDLE  fileToTransmit,
DWORD  numberOfBytesToWrite,
DWORD  numberOfBytesPerSend,
LPOVERLAPPED  lOverlapped,
LPTRANSMIT_FILE_BUFFERS  lTransmitBuffers,
DWORD  flags 
) const [inherited]

Loads, if necessary and available, and then calls TransmitFile(). If the function isn't available then an exception is thrown.

bool LoadTransmitFile ( SOCKET  s  )  const [inherited]

Attempts to load TransmitFile() via a call to WSAIoctl(). Returns true if successful.

bool DisconnectSocketForReuse ( SOCKET  s  )  const [inherited]

Attempts to disconnect a socket for reuse first by attempting to call DisconnectEx() and then by attempting to call TransmitFile() in 'disconnect for reuse mode' see http://msdn2.microsoft.com/en-us/library/ms740565.aspx for details. If neither option is available then an exception is thrown.

bool CanDisconnectSocketForReuse ( SOCKET  s  )  const [inherited]

Returns true if either DisconnectEx() or TransmitFile() can be a call to WSAIoctl().

int WSARecvMsg ( SOCKET  s,
LPWSAMSG  lpMsg,
LPDWORD  lpdwNumberOfBytesRecvd,
LPWSAOVERLAPPED  lpOverlapped,
LPWSAOVERLAPPED_COMPLETION_ROUTINE  lpCompletionRoutine 
) const [inherited]

Loads, if necessary and available, and then calls WSARecvMsg(). If the function isn't available then an exception is thrown.

bool LoadWSARecvMsg ( SOCKET  s  )  const [inherited]

Attempts to load WSARecvMsg() via a call to WSAIoctl(). Returns true if successful.

bool ShouldDispatchOnThisThread (  )  [static, inherited]

bool ShouldDispatchForThisSocket ( const void *  pSocket  )  [static, inherited]

void EnableDispatchOnThisThread ( bool  enable  )  [inherited]

const void * EnableDispatchForThisSocket ( const void *  pSocket  )  [static, inherited]

void DisableDispatchForThisSocket ( const void *  pSocket  )  [static, inherited]


Member Data Documentation

JetByteTools::IO::IIOPool& m_pool [protected, inherited]

SocketAllocator& m_socketAllocator [protected, inherited]

ILimitConnections& m_connectionLimiter [protected, inherited]

const bool m_canEnableSkipCompletionPortOnSuccess [protected, inherited]


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