Public Member Functions | |
CStreamSocketConnectionManager (const CCredentials &credentials, IStreamSocketConnectionManagerCallback &callback, JetByteTools::IO::IIOPool &pool, JetByteTools::Socket::IAllocateSequencedStreamSockets &socketAllocator, JetByteTools::IO::IAllocateBuffers &bufferAllocator) | |
CStreamSocketConnectionManager (bool sslActive, const CCredentials &credentials, IStreamSocketConnectionManagerCallback &callback, JetByteTools::IO::IIOPool &pool, JetByteTools::Socket::IAllocateSequencedStreamSockets &socketAllocator, JetByteTools::IO::IAllocateBuffers &bufferAllocator) | |
CStreamSocketConnectionManager (IStreamSocketConnectionManagerCallback &callback, JetByteTools::IO::IIOPool &pool, JetByteTools::Socket::IAllocateSequencedStreamSockets &socketAllocator, JetByteTools::IO::IAllocateBuffers &bufferAllocator) | |
CStreamSocketConnectionManager (const CStreamSocketConnectionManager &rhs) | |
CStreamSocketConnectionManager & | operator= (const CStreamSocketConnectionManager &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! | |
JetByteTools::Socket::CSmartStreamSocket | SecureConnect (const JetByteTools::Socket::IFullAddress &address, const void *pUserData, RemoteCredentialValidation remoteCredentialValidation=ValidateRemoteCredentialsManually, JetByteTools::Socket::SocketBufferSize recvBufferSize=JetByteTools::Socket::DefaultSocketBufferSize, JetByteTools::Socket::SocketBufferSize sendBufferSize=JetByteTools::Socket::DefaultSocketBufferSize) |
JetByteTools::Socket::CSmartStreamSocket | SecureConnect (const JetByteTools::Core::_tstring &targetName, const JetByteTools::Socket::IFullAddress &address, const void *pUserData, RemoteCredentialValidation remoteCredentialValidation=ValidateRemoteCredentialsManually, JetByteTools::Socket::SocketBufferSize recvBufferSize=JetByteTools::Socket::DefaultSocketBufferSize, JetByteTools::Socket::SocketBufferSize sendBufferSize=JetByteTools::Socket::DefaultSocketBufferSize) |
JetByteTools::Socket::CSmartStreamSocket | SecureConnectNoThrow (const JetByteTools::Socket::IFullAddress &address, const void *pUserData, RemoteCredentialValidation remoteCredentialValidation=ValidateRemoteCredentialsManually, JetByteTools::Socket::SocketBufferSize recvBufferSize=JetByteTools::Socket::DefaultSocketBufferSize, JetByteTools::Socket::SocketBufferSize sendBufferSize=JetByteTools::Socket::DefaultSocketBufferSize) |
JetByteTools::Socket::CSmartStreamSocket | SecureConnectNoThrow (const JetByteTools::Core::_tstring &targetName, const JetByteTools::Socket::IFullAddress &address, const void *pUserData, RemoteCredentialValidation remoteCredentialValidation=ValidateRemoteCredentialsManually, JetByteTools::Socket::SocketBufferSize recvBufferSize=JetByteTools::Socket::DefaultSocketBufferSize, JetByteTools::Socket::SocketBufferSize sendBufferSize=JetByteTools::Socket::DefaultSocketBufferSize) |
JetByteTools::Socket::CSmartStreamSocket | SecureAsyncConnect (const JetByteTools::Socket::IFullAddress &address, const void *pUserData, RemoteCredentialValidation remoteCredentialValidation=ValidateRemoteCredentialsManually, JetByteTools::Socket::SocketBufferSize recvBufferSize=JetByteTools::Socket::DefaultSocketBufferSize, JetByteTools::Socket::SocketBufferSize sendBufferSize=JetByteTools::Socket::DefaultSocketBufferSize) |
JetByteTools::Socket::CSmartStreamSocket | SecureAsyncConnect (const JetByteTools::Core::_tstring &targetName, const JetByteTools::Socket::IFullAddress &address, const void *pUserData, RemoteCredentialValidation remoteCredentialValidation=ValidateRemoteCredentialsManually, JetByteTools::Socket::SocketBufferSize recvBufferSize=JetByteTools::Socket::DefaultSocketBufferSize, JetByteTools::Socket::SocketBufferSize sendBufferSize=JetByteTools::Socket::DefaultSocketBufferSize) |
JetByteTools::Socket::CSmartStreamSocket | SecureAsyncConnectNoThrow (const JetByteTools::Socket::IFullAddress &address, const void *pUserData, RemoteCredentialValidation remoteCredentialValidation=ValidateRemoteCredentialsManually, JetByteTools::Socket::SocketBufferSize recvBufferSize=JetByteTools::Socket::DefaultSocketBufferSize, JetByteTools::Socket::SocketBufferSize sendBufferSize=JetByteTools::Socket::DefaultSocketBufferSize) |
JetByteTools::Socket::CSmartStreamSocket | SecureAsyncConnectNoThrow (const JetByteTools::Core::_tstring &targetName, const JetByteTools::Socket::IFullAddress &address, const void *pUserData, RemoteCredentialValidation remoteCredentialValidation=ValidateRemoteCredentialsManually, JetByteTools::Socket::SocketBufferSize recvBufferSize=JetByteTools::Socket::DefaultSocketBufferSize, JetByteTools::Socket::SocketBufferSize sendBufferSize=JetByteTools::Socket::DefaultSocketBufferSize) |
JetByteTools::Socket::CSmartStreamSocket | SecureConnectAsyncIfAvailable (const JetByteTools::Socket::IFullAddress &address, const void *pUserData, RemoteCredentialValidation remoteCredentialValidation=ValidateRemoteCredentialsManually, JetByteTools::Socket::SocketBufferSize recvBufferSize=JetByteTools::Socket::DefaultSocketBufferSize, JetByteTools::Socket::SocketBufferSize sendBufferSize=JetByteTools::Socket::DefaultSocketBufferSize) |
JetByteTools::Socket::CSmartStreamSocket | SecureConnectAsyncIfAvailable (const JetByteTools::Core::_tstring &targetName, const JetByteTools::Socket::IFullAddress &address, const void *pUserData, RemoteCredentialValidation remoteCredentialValidation=ValidateRemoteCredentialsManually, JetByteTools::Socket::SocketBufferSize recvBufferSize=JetByteTools::Socket::DefaultSocketBufferSize, JetByteTools::Socket::SocketBufferSize sendBufferSize=JetByteTools::Socket::DefaultSocketBufferSize) |
JetByteTools::Socket::CSmartStreamSocket | SecureConnectAsyncIfAvailableNoThrow (const JetByteTools::Socket::IFullAddress &address, const void *pUserData, RemoteCredentialValidation remoteCredentialValidation=ValidateRemoteCredentialsManually, JetByteTools::Socket::SocketBufferSize recvBufferSize=JetByteTools::Socket::DefaultSocketBufferSize, JetByteTools::Socket::SocketBufferSize sendBufferSize=JetByteTools::Socket::DefaultSocketBufferSize) |
JetByteTools::Socket::CSmartStreamSocket | SecureConnectAsyncIfAvailableNoThrow (const JetByteTools::Core::_tstring &targetName, const JetByteTools::Socket::IFullAddress &address, const void *pUserData, RemoteCredentialValidation remoteCredentialValidation=ValidateRemoteCredentialsManually, JetByteTools::Socket::SocketBufferSize recvBufferSize=JetByteTools::Socket::DefaultSocketBufferSize, JetByteTools::Socket::SocketBufferSize sendBufferSize=JetByteTools::Socket::DefaultSocketBufferSize) |
bool | IsSecure (const JetByteTools::Socket::IStreamSocket &socket) const |
bool | RequiresPeerVerification (const JetByteTools::Socket::IStreamSocket &socket) const |
void | Renegotiate (const JetByteTools::Socket::IStreamSocket &socket) const |
void | Renegotiate (const JetByteTools::Socket::IStreamSocket &socket, ClientAuthenticationRequirements requirements) const |
void | Shutdown (const JetByteTools::Socket::IStreamSocket &socket) const |
void | SendAlert (const JetByteTools::Socket::IStreamSocket &socket, DWORD alertType, DWORD alertNumber) const |
void | SessionControl (const JetByteTools::Socket::IStreamSocket &socket, DWORD sessionFlags) const |
Protected Member Functions | |
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 | ConnectionEstablished (IStreamSocketEx &socket, const IAddress &address) |
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::IIOPool & | m_pool |
SocketAllocator & | m_socketAllocator |
ILimitConnections & | m_connectionLimiter |
JetByteTools::Core::CManualResetEvent | m_noActiveConnectionsEvent |
JetByteTools::Core::CAtomicCounter | m_activeConnections |
const bool | m_canEnableSkipCompletionPortOnSuccess |
CStreamSocketConnectionManager | ( | const CCredentials & | credentials, | |
IStreamSocketConnectionManagerCallback & | callback, | |||
JetByteTools::IO::IIOPool & | pool, | |||
JetByteTools::Socket::IAllocateSequencedStreamSockets & | socketAllocator, | |||
JetByteTools::IO::IAllocateBuffers & | bufferAllocator | |||
) |
CStreamSocketConnectionManager | ( | bool | sslActive, | |
const CCredentials & | credentials, | |||
IStreamSocketConnectionManagerCallback & | callback, | |||
JetByteTools::IO::IIOPool & | pool, | |||
JetByteTools::Socket::IAllocateSequencedStreamSockets & | socketAllocator, | |||
JetByteTools::IO::IAllocateBuffers & | bufferAllocator | |||
) |
CStreamSocketConnectionManager | ( | IStreamSocketConnectionManagerCallback & | callback, | |
JetByteTools::IO::IIOPool & | pool, | |||
JetByteTools::Socket::IAllocateSequencedStreamSockets & | socketAllocator, | |||
JetByteTools::IO::IAllocateBuffers & | bufferAllocator | |||
) |
CStreamSocketConnectionManager | ( | const CStreamSocketConnectionManager & | rhs | ) |
CStreamSocketConnectionManager& operator= | ( | const CStreamSocketConnectionManager & | rhs | ) |
virtual CSmartStreamSocket Connect | ( | const IFullAddress & | address, | |
const void * | pUserData = nullptr , |
|||
SocketBufferSize | recvBufferSize = DefaultSocketBufferSize , |
|||
SocketBufferSize | sendBufferSize = DefaultSocketBufferSize | |||
) | [virtual, inherited] |
CSmartStreamSocket Connect | ( | const IFullAddress & | address, | |
const void * | pUserData, | |||
const void * | pFilterData, | |||
SocketBufferSize | recvBufferSize, | |||
SocketBufferSize | sendBufferSize | |||
) | [protected, inherited] |
virtual CSmartStreamSocket ConnectNoThrow | ( | const IFullAddress & | address, | |
const void * | pUserData = nullptr , |
|||
SocketBufferSize | recvBufferSize = DefaultSocketBufferSize , |
|||
SocketBufferSize | sendBufferSize = DefaultSocketBufferSize | |||
) | [virtual, inherited] |
CSmartStreamSocket ConnectNoThrow | ( | const IFullAddress & | address, | |
const void * | pUserData, | |||
const void * | pFilterData, | |||
SocketBufferSize | recvBufferSize, | |||
SocketBufferSize | sendBufferSize | |||
) | [protected, inherited] |
virtual CSmartStreamSocket AsyncConnect | ( | const IFullAddress & | address, | |
const void * | pUserData = nullptr , |
|||
SocketBufferSize | recvBufferSize = DefaultSocketBufferSize , |
|||
SocketBufferSize | sendBufferSize = DefaultSocketBufferSize | |||
) | [virtual, inherited] |
CSmartStreamSocket AsyncConnect | ( | const IFullAddress & | address, | |
const void * | pUserData, | |||
const void * | pFilterData, | |||
SocketBufferSize | recvBufferSize, | |||
SocketBufferSize | sendBufferSize | |||
) | [protected, inherited] |
virtual CSmartStreamSocket AsyncConnectNoThrow | ( | const IFullAddress & | address, | |
const void * | pUserData = nullptr , |
|||
SocketBufferSize | recvBufferSize = DefaultSocketBufferSize , |
|||
SocketBufferSize | sendBufferSize = DefaultSocketBufferSize | |||
) | [virtual, inherited] |
CSmartStreamSocket AsyncConnectNoThrow | ( | const IFullAddress & | address, | |
const void * | pUserData, | |||
const void * | pFilterData, | |||
SocketBufferSize | recvBufferSize, | |||
SocketBufferSize | sendBufferSize | |||
) | [protected, inherited] |
virtual CSmartStreamSocket ConnectAsyncIfAvailable | ( | const IFullAddress & | address, | |
const void * | pUserData = nullptr , |
|||
SocketBufferSize | recvBufferSize = DefaultSocketBufferSize , |
|||
SocketBufferSize | sendBufferSize = DefaultSocketBufferSize | |||
) | [virtual, inherited] |
CSmartStreamSocket ConnectAsyncIfAvailable | ( | const IFullAddress & | address, | |
const void * | pUserData, | |||
const void * | pFilterData, | |||
SocketBufferSize | recvBufferSize, | |||
SocketBufferSize | sendBufferSize | |||
) | [protected, inherited] |
virtual CSmartStreamSocket ConnectAsyncIfAvailableNoThrow | ( | const IFullAddress & | address, | |
const void * | pUserData = nullptr , |
|||
SocketBufferSize | recvBufferSize = DefaultSocketBufferSize , |
|||
SocketBufferSize | sendBufferSize = DefaultSocketBufferSize | |||
) | [virtual, inherited] |
CSmartStreamSocket ConnectAsyncIfAvailableNoThrow | ( | const IFullAddress & | address, | |
const void * | pUserData, | |||
const void * | pFilterData, | |||
SocketBufferSize | recvBufferSize, | |||
SocketBufferSize | sendBufferSize | |||
) | [protected, inherited] |
bool AsyncConnectAvailable | ( | const IAddressType & | addressType | ) | const [override, inherited] |
void ConnectionEstablished | ( | IStreamSocketEx & | socket, | |
const IAddress & | address | |||
) | [protected, inherited] |
void JoinIOPoolLogicalThreadGroup | ( | ) | const [protected, inherited] |
void PostIoOperationOnHandler | ( | JetByteTools::IO::IHandler & | handler, | |
JetByteTools::IO::CSmartBuffer & | buffer, | |||
DWORD | operation, | |||
bool | forceDispatchToPool = false | |||
) | [protected, inherited] |
void IssueRead | ( | IStreamSocketEx & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer | |||
) | [override, protected, virtual, inherited] |
Implements IStreamSocketConnectionManagerIO.
void IssueWrite | ( | IStreamSocketEx & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer | |||
) | [override, protected, virtual, inherited] |
Implements IStreamSocketConnectionManagerIO.
void HandleOperation | ( | IStreamSocketEx & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer, | |||
DWORD | ioSize, | |||
DWORD | lastError | |||
) | [override, protected, inherited] |
void RequestRead | ( | IStreamSocketEx & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer | |||
) | [override, protected, inherited] |
void RequestWrite | ( | IStreamSocketEx & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer | |||
) | [override, protected, inherited] |
void RequestWrite | ( | IStreamSocketEx & | socket, | |
JetByteTools::IO::IIterateableBufferChain & | buffers | |||
) | [override, protected, inherited] |
void ExecuteWrite | ( | IStreamSocketEx & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer | |||
) | [override, protected, inherited] |
void OnClientClose | ( | IStreamSocketEx & | socket | ) | [override, protected, inherited] |
void OnConnectionReset | ( | IStreamSocketEx & | socket, | |
DWORD | lastError | |||
) | [override, protected, inherited] |
void OnConnectionClosed | ( | IStreamSocketEx & | socket, | |
ConnectionClosureReason | reason | |||
) | [override, protected, inherited] |
void OnConnectionShutdown | ( | IStreamSocketEx & | socket, | |
ShutdownHow | how | |||
) | [override, protected, inherited] |
void OnConnectionAborted | ( | IStreamSocketEx & | socket, | |
ConnectionClosureReason | reason, | |||
bool | wasUserSocket | |||
) | [override, protected, inherited] |
void RequestCancelIO | ( | IStreamSocketEx & | socket | ) | [override, protected, inherited] |
CSmartStreamSocketEx AllocateSocket | ( | SOCKET | theSocket | ) | [protected, inherited] |
SOCKET CreateSocket | ( | const IAddressType & | addressType, | |
SocketBufferSize | recvBufferSize, | |||
SocketBufferSize | sendBufferSize | |||
) | const [protected, inherited] |
void IssueReadOOBIfRequired | ( | IStreamSocketEx & | socket | ) | [protected, inherited] |
void IssueReadOOBIfRequired | ( | IStreamSocketEx & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer | |||
) | [protected, inherited] |
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] |
Starts the shutdown process and returns immediately.
Reimplemented in TDatagramSocketServer, and TStreamSocketServerEx< TStreamSocketConnectionManager< CFilteringStreamSocketConnectionManagerBase > >.
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.
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.
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.
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.
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.
Attempts to load TransmitFile() via a call to WSAIoctl(). Returns true if successful.
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.
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.
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] |
JetByteTools::Socket::CSmartStreamSocket SecureConnect | ( | const JetByteTools::Socket::IFullAddress & | address, | |
const void * | pUserData, | |||
RemoteCredentialValidation | remoteCredentialValidation = ValidateRemoteCredentialsManually , |
|||
JetByteTools::Socket::SocketBufferSize | recvBufferSize = JetByteTools::Socket::DefaultSocketBufferSize , |
|||
JetByteTools::Socket::SocketBufferSize | sendBufferSize = JetByteTools::Socket::DefaultSocketBufferSize | |||
) | [inherited] |
JetByteTools::Socket::CSmartStreamSocket SecureConnect | ( | const JetByteTools::Core::_tstring & | targetName, | |
const JetByteTools::Socket::IFullAddress & | address, | |||
const void * | pUserData, | |||
RemoteCredentialValidation | remoteCredentialValidation = ValidateRemoteCredentialsManually , |
|||
JetByteTools::Socket::SocketBufferSize | recvBufferSize = JetByteTools::Socket::DefaultSocketBufferSize , |
|||
JetByteTools::Socket::SocketBufferSize | sendBufferSize = JetByteTools::Socket::DefaultSocketBufferSize | |||
) | [inherited] |
JetByteTools::Socket::CSmartStreamSocket SecureConnectNoThrow | ( | const JetByteTools::Socket::IFullAddress & | address, | |
const void * | pUserData, | |||
RemoteCredentialValidation | remoteCredentialValidation = ValidateRemoteCredentialsManually , |
|||
JetByteTools::Socket::SocketBufferSize | recvBufferSize = JetByteTools::Socket::DefaultSocketBufferSize , |
|||
JetByteTools::Socket::SocketBufferSize | sendBufferSize = JetByteTools::Socket::DefaultSocketBufferSize | |||
) | [inherited] |
JetByteTools::Socket::CSmartStreamSocket SecureConnectNoThrow | ( | const JetByteTools::Core::_tstring & | targetName, | |
const JetByteTools::Socket::IFullAddress & | address, | |||
const void * | pUserData, | |||
RemoteCredentialValidation | remoteCredentialValidation = ValidateRemoteCredentialsManually , |
|||
JetByteTools::Socket::SocketBufferSize | recvBufferSize = JetByteTools::Socket::DefaultSocketBufferSize , |
|||
JetByteTools::Socket::SocketBufferSize | sendBufferSize = JetByteTools::Socket::DefaultSocketBufferSize | |||
) | [inherited] |
JetByteTools::Socket::CSmartStreamSocket SecureAsyncConnect | ( | const JetByteTools::Socket::IFullAddress & | address, | |
const void * | pUserData, | |||
RemoteCredentialValidation | remoteCredentialValidation = ValidateRemoteCredentialsManually , |
|||
JetByteTools::Socket::SocketBufferSize | recvBufferSize = JetByteTools::Socket::DefaultSocketBufferSize , |
|||
JetByteTools::Socket::SocketBufferSize | sendBufferSize = JetByteTools::Socket::DefaultSocketBufferSize | |||
) | [inherited] |
JetByteTools::Socket::CSmartStreamSocket SecureAsyncConnect | ( | const JetByteTools::Core::_tstring & | targetName, | |
const JetByteTools::Socket::IFullAddress & | address, | |||
const void * | pUserData, | |||
RemoteCredentialValidation | remoteCredentialValidation = ValidateRemoteCredentialsManually , |
|||
JetByteTools::Socket::SocketBufferSize | recvBufferSize = JetByteTools::Socket::DefaultSocketBufferSize , |
|||
JetByteTools::Socket::SocketBufferSize | sendBufferSize = JetByteTools::Socket::DefaultSocketBufferSize | |||
) | [inherited] |
JetByteTools::Socket::CSmartStreamSocket SecureAsyncConnectNoThrow | ( | const JetByteTools::Socket::IFullAddress & | address, | |
const void * | pUserData, | |||
RemoteCredentialValidation | remoteCredentialValidation = ValidateRemoteCredentialsManually , |
|||
JetByteTools::Socket::SocketBufferSize | recvBufferSize = JetByteTools::Socket::DefaultSocketBufferSize , |
|||
JetByteTools::Socket::SocketBufferSize | sendBufferSize = JetByteTools::Socket::DefaultSocketBufferSize | |||
) | [inherited] |
JetByteTools::Socket::CSmartStreamSocket SecureAsyncConnectNoThrow | ( | const JetByteTools::Core::_tstring & | targetName, | |
const JetByteTools::Socket::IFullAddress & | address, | |||
const void * | pUserData, | |||
RemoteCredentialValidation | remoteCredentialValidation = ValidateRemoteCredentialsManually , |
|||
JetByteTools::Socket::SocketBufferSize | recvBufferSize = JetByteTools::Socket::DefaultSocketBufferSize , |
|||
JetByteTools::Socket::SocketBufferSize | sendBufferSize = JetByteTools::Socket::DefaultSocketBufferSize | |||
) | [inherited] |
JetByteTools::Socket::CSmartStreamSocket SecureConnectAsyncIfAvailable | ( | const JetByteTools::Socket::IFullAddress & | address, | |
const void * | pUserData, | |||
RemoteCredentialValidation | remoteCredentialValidation = ValidateRemoteCredentialsManually , |
|||
JetByteTools::Socket::SocketBufferSize | recvBufferSize = JetByteTools::Socket::DefaultSocketBufferSize , |
|||
JetByteTools::Socket::SocketBufferSize | sendBufferSize = JetByteTools::Socket::DefaultSocketBufferSize | |||
) | [inherited] |
JetByteTools::Socket::CSmartStreamSocket SecureConnectAsyncIfAvailable | ( | const JetByteTools::Core::_tstring & | targetName, | |
const JetByteTools::Socket::IFullAddress & | address, | |||
const void * | pUserData, | |||
RemoteCredentialValidation | remoteCredentialValidation = ValidateRemoteCredentialsManually , |
|||
JetByteTools::Socket::SocketBufferSize | recvBufferSize = JetByteTools::Socket::DefaultSocketBufferSize , |
|||
JetByteTools::Socket::SocketBufferSize | sendBufferSize = JetByteTools::Socket::DefaultSocketBufferSize | |||
) | [inherited] |
JetByteTools::Socket::CSmartStreamSocket SecureConnectAsyncIfAvailableNoThrow | ( | const JetByteTools::Socket::IFullAddress & | address, | |
const void * | pUserData, | |||
RemoteCredentialValidation | remoteCredentialValidation = ValidateRemoteCredentialsManually , |
|||
JetByteTools::Socket::SocketBufferSize | recvBufferSize = JetByteTools::Socket::DefaultSocketBufferSize , |
|||
JetByteTools::Socket::SocketBufferSize | sendBufferSize = JetByteTools::Socket::DefaultSocketBufferSize | |||
) | [inherited] |
JetByteTools::Socket::CSmartStreamSocket SecureConnectAsyncIfAvailableNoThrow | ( | const JetByteTools::Core::_tstring & | targetName, | |
const JetByteTools::Socket::IFullAddress & | address, | |||
const void * | pUserData, | |||
RemoteCredentialValidation | remoteCredentialValidation = ValidateRemoteCredentialsManually , |
|||
JetByteTools::Socket::SocketBufferSize | recvBufferSize = JetByteTools::Socket::DefaultSocketBufferSize , |
|||
JetByteTools::Socket::SocketBufferSize | sendBufferSize = JetByteTools::Socket::DefaultSocketBufferSize | |||
) | [inherited] |
bool IsSecure | ( | const JetByteTools::Socket::IStreamSocket & | socket | ) | const [inherited] |
bool RequiresPeerVerification | ( | const JetByteTools::Socket::IStreamSocket & | socket | ) | const [inherited] |
void Renegotiate | ( | const JetByteTools::Socket::IStreamSocket & | socket | ) | const [inherited] |
void Renegotiate | ( | const JetByteTools::Socket::IStreamSocket & | socket, | |
ClientAuthenticationRequirements | requirements | |||
) | const [inherited] |
void Shutdown | ( | const JetByteTools::Socket::IStreamSocket & | socket | ) | const [inherited] |
void SendAlert | ( | const JetByteTools::Socket::IStreamSocket & | socket, | |
DWORD | alertType, | |||
DWORD | alertNumber | |||
) | const [inherited] |
void SessionControl | ( | const JetByteTools::Socket::IStreamSocket & | socket, | |
DWORD | sessionFlags | |||
) | const [inherited] |
JetByteTools::IO::IIOPool& m_pool [protected, inherited] |
SocketAllocator& m_socketAllocator [protected, inherited] |
ILimitConnections& m_connectionLimiter [protected, inherited] |
JetByteTools::Core::CManualResetEvent m_noActiveConnectionsEvent [protected, inherited] |
JetByteTools::Core::CAtomicCounter m_activeConnections [protected, inherited] |
const bool m_canEnableSkipCompletionPortOnSuccess [protected, inherited] |