Called whenever a new connection is established, i.e. when the accept method succeeds.

It is up to this method, designed to be overriden (this implementation throws a ServerStreamSocketException in all cases), to initialize the AnonymousProtocolAwareStreamSocket instance it is given, which includes setting its associated protocol server.

void MyActualServer::accepted( AnonymousStreamSocket & newConnection ) throw( ServerStreamSocketException ) {

AnonymousProtocolAwareStreamSocket * toCustomize = dynamic_cast<AnonymousProtocolAwareStreamSocket *>( newConnection ) ;

toCustomize->setProtocolServer( new MySpecificProtocol(...) ) ;


This method must be overriden, and must set a protocol server for the given AnonymousProtocolAwareStreamSocket instance.
ServerStreamSocketException in all cases.
See also:

Generated on Thu Jun 4 20:39:15 2009 for Ceylan by  doxygen 1.5.8