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

IStreamSocketCallback Class Reference
[SocketsStream SocketsCallback eventsInterfacesProtected destructors on abstract base classes]

Inheritance diagram for IStreamSocketCallback:
Collaboration diagram for IStreamSocketCallback:

List of all members.


Detailed Description

The connection manager and socket server callback interfaces are composed from more specific interfaces using inheritance. This is purely to allow the framework to work in terms of the narrowest interface internally and does not affect the user of the code. Effectively the first interface that the user would wish to implement is at the IXXXConnectionManagerCallback level and above.

Public Member Functions

virtual void OnConnectionClientClose (IStreamSocket &socket)=0
 Called when the 'read side' of the connection is closed by the remote end. The remote end of the connection can no longer send data to you as it has issued a shutdown() call and shut down at least the write side of its socket. This means that you can no longer read from the connection but you may still be able to write to the connection.
virtual void OnConnectionReset (IStreamSocket &socket, DWORD lastError)=0
 Called when the connection is reset.
virtual void OnConnectionClosure (IStreamSocket &socket, ConnectionClosureReason reason)=0
 Called when the connection is closed.
virtual void OnConnectionClosed (IStreamSocket &socket)=0
 Called when the connection is closed. Note that this callback is purely for backwards compatibility with pre v6.2 code. You will get both an OnConnectionClosure() callback with a closure reason and then an OnConnectionClosed() without a reason. OnConnectionClosed() MAY be removed in a future release of the framework.
virtual void OnError (const JetByteTools::Core::_tstring &message)=0
 Called when there is an error which is not related to a particular connection (such as an exception thrown whilst handling an I/O operation or something...). Not a lot you can do except log the error message... Possibly shouldn't be exposed to client code?
virtual void OnError (const JetByteTools::Core::_tstring &message, DWORD lastError)=0

Protected Member Functions

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

Constructor & Destructor Documentation

virtual ~IStreamSocketCallback (  )  [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 OnConnectionClientClose ( IStreamSocket socket  )  [pure virtual]

Called when the 'read side' of the connection is closed by the remote end. The remote end of the connection can no longer send data to you as it has issued a shutdown() call and shut down at least the write side of its socket. This means that you can no longer read from the connection but you may still be able to write to the connection.

Implemented in CHTTPSocketServer, CStreamSocketConnectionManagerCallback, CStreamSocketServerCallback, CStreamSocketServerExCallback, CStreamSocketConnectionManagerCallback, CStreamSocketServerCallback, CStreamSocketServerExCallback, CStreamSocketConnectionManagerCallback, CStreamSocketServerCallback, CStreamSocketServerExCallback, CStreamSocketConnectionManagerCallback, CStreamSocketServerCallback, CStreamSocketServerExCallback, and CStreamSocketServerExCallback.

virtual void OnConnectionClosed ( IStreamSocket socket  )  [pure virtual]

virtual void OnError ( const JetByteTools::Core::_tstring message  )  [pure virtual, inherited]


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