Start() public method

Starts the server accepting incoming connection requests.
/// Thrown when this instance has been disposed of. /// /// A caller higher in the call stack does not have permission for the requested operation. /// /// Thrown when an error occurred when attempting to bind the underlying socket. ///
public Start ( ) : void
return void
 private void Start()
 {
     Debug.Assert(_server == null);
     _server = new TcpServer(
         endpoint: ServiceConfiguration.Server.Endpoint,
         handler: new ProxySessionManager(CreateReader()),
         backlog: ServiceConfiguration.Server.ConnectionBacklog);
     _server.Start();
 }
Beispiel #2
0
 private void RunCore(IMessageReader reader, IPEndPoint endpoint, int connectionBacklog)
 {
     using(var server = new TcpServer(
         endpoint: endpoint ?? new IPEndPoint(IPAddress.Any, ProxyMessageReader.DefaultPort),
         handler: new ProxySessionManager(reader),
         backlog: connectionBacklog))
     {
         server.Start();
         CmdLineCancelKey.WaitFor().Dispose();
     }
 }