C# Class Agnos.Servers.BaseServer

The base class of all Agnos servers. note that you're not required to extend this class in order to be implement a server -- it's just a place to store all of the common logic
Mostrar archivo Open project: tomerfiliba/agnos Class Usage Examples

Protected Properties

Property Type Description
processorFactory Protocol.IProcessorFactory
transportFactory ITransportFactory

Public Methods

Method Description
BaseServer ( Protocol processorFactory, ITransportFactory transportFactory ) : System
Serve ( ) : void

Protected Methods

Method Description
handleClient ( Protocol processor ) : void

the basic client handler -- calls processor.process in a loop, until the client disconnects

serveClient ( Protocol processor ) : void

implement this method to serve the client in whatever which way is appropriate (blocking, threaded, forking, threadpool, ...)

Method Details

BaseServer() public method

public BaseServer ( Protocol processorFactory, ITransportFactory transportFactory ) : System
processorFactory Protocol
transportFactory ITransportFactory
return System

Serve() public method

public Serve ( ) : void
return void

handleClient() protected static method

the basic client handler -- calls processor.process in a loop, until the client disconnects
protected static handleClient ( Protocol processor ) : void
processor Protocol /// the processor instance that represents the client ///
return void

serveClient() protected abstract method

implement this method to serve the client in whatever which way is appropriate (blocking, threaded, forking, threadpool, ...)
protected abstract serveClient ( Protocol processor ) : void
processor Protocol /// the processor instance that represents the client ///
return void

Property Details

processorFactory protected_oe property

protected Protocol.IProcessorFactory processorFactory
return Protocol.IProcessorFactory

transportFactory protected_oe property

protected ITransportFactory transportFactory
return ITransportFactory