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

IMaintainStreamSocketConnections Class Reference
[Stream SocketsConnection managersInterfacesProtected destructors on abstract base classes]

Inheritance diagram for IMaintainStreamSocketConnections:
Collaboration diagram for IMaintainStreamSocketConnections:

List of all members.


Detailed Description

An interface used to create and maintain outgoing stream socket connections.

Public Member Functions

virtual void MaintainConnections (const IFullAddress &address, Milliseconds reconnectTimeout, SocketBufferSize recvBufferSize=DefaultSocketBufferSize, SocketBufferSize sendBufferSize=DefaultSocketBufferSize)=0
 Sets the connection retry timeout for connections to the supplied address to the supplied value.
virtual bool TryCancelConnectionRetries (const IAddress &address, bool shutDownExistingConnections=false)=0
 Attempts to cancel connection reties attempts to the supplied address. Returns false if the connection wasn't currently being maintained.
virtual void CancelConnectionRetries (const IAddress &address, bool shutDownExistingConnections=false)=0
 Cancels connection reties attempts to the supplied address.
virtual void CancelAllConnectionRetries ()=0
 Cancels connection reties for all connections that are maintained by this connection manager.
virtual
CSmartStreamSocket 
Connect (const IFullAddress &address, const void *pUserData=nullptr, SocketBufferSize recvBufferSize=DefaultSocketBufferSize, SocketBufferSize sendBufferSize=DefaultSocketBufferSize)=0
 Connects, synchronously, to the specified address and returns a smart pointer to the resulting stream socket. Throws exceptions on failure to connect, the resulting stream socket is always connected and valid. Passes the user data pointer through to IStreamSocketConnectionManagerCallback::OnPreOutgoingConnect() before returning. Sets send and recv buffer sizes before connection if values other than 0 are supplied; note that this WILL affect the TCP window size. Calls IStreamSocketConnectionManagerCallback::OnConnectionEstablished(), before returning, if the connection is successful.
virtual
CSmartStreamSocket 
ConnectNoThrow (const IFullAddress &address, const void *pUserData=nullptr, SocketBufferSize recvBufferSize=DefaultSocketBufferSize, SocketBufferSize sendBufferSize=DefaultSocketBufferSize)=0
 Connects, synchronously, to the specified address and returns a smart pointer to the resulting stream socket. Does not throw exceptions, the smart stream pointer will be null if the connection attempt fails; call CSmartStreamSocket::Get() to determine this. Passes the user data pointer through to IStreamSocketConnectionManagerCallback::OnPreOutgoingConnect() before returning. Sets send and recv buffer sizes before connection if values other than 0 are supplied; note that this WILL affect the TCP window size. Calls IStreamSocketConnectionManagerCallback::OnOutgoingConnectionFailed(), before returning, if the connection fails and IStreamSocketConnectionManagerCallback::OnConnectionEstablished(), before returning, if the connection is successful.
virtual
CSmartStreamSocket 
AsyncConnect (const IFullAddress &address, const void *pUserData=nullptr, SocketBufferSize recvBufferSize=DefaultSocketBufferSize, SocketBufferSize sendBufferSize=DefaultSocketBufferSize)=0
 Connects, asynchronously, to the specified address and returns a smart pointer to the resulting stream socket. Throws exceptions on some failures to connect. The smart stream pointer is not connected until the IStreamSocketConnectionManagerCallback::OnConnectionEstablished() has been called and this may be before or after the function returns to the caller. Sets send and recv buffer sizes before connection if values other than 0 are supplied; note that this WILL affect the TCP window size. Passes the user data pointer through to IStreamSocketConnectionManagerCallback::OnPreOutgoingConnect() before returning. Calls IStreamSocketConnectionManagerCallback::OnOutgoingConnectionFailed(), either before or after returning, if the connection fails and IStreamSocketConnectionManagerCallback::OnConnectionEstablished(), either before or after returning, if the connection is successful.
virtual
CSmartStreamSocket 
AsyncConnectNoThrow (const IFullAddress &address, const void *pUserData=nullptr, SocketBufferSize recvBufferSize=DefaultSocketBufferSize, SocketBufferSize sendBufferSize=DefaultSocketBufferSize)=0
 Connects, asynchronously, to the specified address and returns a smart pointer to the resulting stream socket. Does not throw exceptions, the smart stream pointer will be null if the connection attempt fails; call CSmartStreamSocket::Get() to determine this. Passes the user data pointer through to IStreamSocketConnectionManagerCallback::OnPreOutgoingConnect() before returning. Sets send and recv buffer sizes before connection if values other than 0 are supplied; note that this WILL affect the TCP window size. Calls IStreamSocketConnectionManagerCallback::OnOutgoingConnectionFailed(), either before or after returning, if the connection fails and IStreamSocketConnectionManagerCallback::OnConnectionEstablished(), either before or after returning, if the connection is successful.
virtual
CSmartStreamSocket 
ConnectAsyncIfAvailable (const IFullAddress &address, const void *pUserData=nullptr, SocketBufferSize recvBufferSize=DefaultSocketBufferSize, SocketBufferSize sendBufferSize=DefaultSocketBufferSize)=0
 If the platform supports asynchronous connections for this address type then acts as an AsyncConnect() else acts as a ConnectNoThrow().
virtual
CSmartStreamSocket 
ConnectAsyncIfAvailableNoThrow (const IFullAddress &address, const void *pUserData=nullptr, SocketBufferSize recvBufferSize=DefaultSocketBufferSize, SocketBufferSize sendBufferSize=DefaultSocketBufferSize)=0
 If the platform supports asynchronous connections for this address type then acts as an AsyncConnectNoThrow() else acts as a ConnectNoThrow().
virtual bool AsyncConnectAvailable (const IAddressType &addressType) const =0
 Returns true if the platform supports asynchronous connections for this address type.
virtual DWORD AbortAllConnections ()=0
 Aborts all connections that are managed by this connection manager.

Protected Member Functions

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

Constructor & Destructor Documentation

virtual ~IMaintainStreamSocketConnections (  )  [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 MaintainConnections ( const IFullAddress address,
Milliseconds  reconnectTimeout,
SocketBufferSize  recvBufferSize = DefaultSocketBufferSize,
SocketBufferSize  sendBufferSize = DefaultSocketBufferSize 
) [pure virtual]

Sets the connection retry timeout for connections to the supplied address to the supplied value.

Implemented in CConnectionMaintainingStreamSocketConnectionFilter.

virtual bool TryCancelConnectionRetries ( const IAddress address,
bool  shutDownExistingConnections = false 
) [pure virtual]

Attempts to cancel connection reties attempts to the supplied address. Returns false if the connection wasn't currently being maintained.

Implemented in CConnectionMaintainingStreamSocketConnectionFilter.

virtual void CancelConnectionRetries ( const IAddress address,
bool  shutDownExistingConnections = false 
) [pure virtual]

Cancels connection reties attempts to the supplied address.

Implemented in CConnectionMaintainingStreamSocketConnectionFilter.

virtual void CancelAllConnectionRetries (  )  [pure virtual]

Cancels connection reties for all connections that are maintained by this connection manager.

Implemented in CConnectionMaintainingStreamSocketConnectionFilter.

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

Connects, synchronously, to the specified address and returns a smart pointer to the resulting stream socket. Throws exceptions on failure to connect, the resulting stream socket is always connected and valid. Passes the user data pointer through to IStreamSocketConnectionManagerCallback::OnPreOutgoingConnect() before returning. Sets send and recv buffer sizes before connection if values other than 0 are supplied; note that this WILL affect the TCP window size. Calls IStreamSocketConnectionManagerCallback::OnConnectionEstablished(), before returning, if the connection is successful.

Implemented in CConnectionMaintainingStreamSocketConnectionFilter.

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

Connects, synchronously, to the specified address and returns a smart pointer to the resulting stream socket. Does not throw exceptions, the smart stream pointer will be null if the connection attempt fails; call CSmartStreamSocket::Get() to determine this. Passes the user data pointer through to IStreamSocketConnectionManagerCallback::OnPreOutgoingConnect() before returning. Sets send and recv buffer sizes before connection if values other than 0 are supplied; note that this WILL affect the TCP window size. Calls IStreamSocketConnectionManagerCallback::OnOutgoingConnectionFailed(), before returning, if the connection fails and IStreamSocketConnectionManagerCallback::OnConnectionEstablished(), before returning, if the connection is successful.

Implemented in CConnectionMaintainingStreamSocketConnectionFilter.

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

Connects, asynchronously, to the specified address and returns a smart pointer to the resulting stream socket. Throws exceptions on some failures to connect. The smart stream pointer is not connected until the IStreamSocketConnectionManagerCallback::OnConnectionEstablished() has been called and this may be before or after the function returns to the caller. Sets send and recv buffer sizes before connection if values other than 0 are supplied; note that this WILL affect the TCP window size. Passes the user data pointer through to IStreamSocketConnectionManagerCallback::OnPreOutgoingConnect() before returning. Calls IStreamSocketConnectionManagerCallback::OnOutgoingConnectionFailed(), either before or after returning, if the connection fails and IStreamSocketConnectionManagerCallback::OnConnectionEstablished(), either before or after returning, if the connection is successful.

Implemented in CConnectionMaintainingStreamSocketConnectionFilter.

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

Connects, asynchronously, to the specified address and returns a smart pointer to the resulting stream socket. Does not throw exceptions, the smart stream pointer will be null if the connection attempt fails; call CSmartStreamSocket::Get() to determine this. Passes the user data pointer through to IStreamSocketConnectionManagerCallback::OnPreOutgoingConnect() before returning. Sets send and recv buffer sizes before connection if values other than 0 are supplied; note that this WILL affect the TCP window size. Calls IStreamSocketConnectionManagerCallback::OnOutgoingConnectionFailed(), either before or after returning, if the connection fails and IStreamSocketConnectionManagerCallback::OnConnectionEstablished(), either before or after returning, if the connection is successful.

Implemented in CConnectionMaintainingStreamSocketConnectionFilter.

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

If the platform supports asynchronous connections for this address type then acts as an AsyncConnect() else acts as a ConnectNoThrow().

Implemented in CConnectionMaintainingStreamSocketConnectionFilter.

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

If the platform supports asynchronous connections for this address type then acts as an AsyncConnectNoThrow() else acts as a ConnectNoThrow().

Implemented in CConnectionMaintainingStreamSocketConnectionFilter.

virtual bool AsyncConnectAvailable ( const IAddressType addressType  )  const [pure virtual, inherited]

Returns true if the platform supports asynchronous connections for this address type.

Implemented in CConnectionMaintainingStreamSocketConnectionFilter.


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