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
コード例 #1
0
 private void Start()
 {
     Debug.Assert(_server == null);
     _server = new TcpServer(
         endpoint: ServiceConfiguration.Server.Endpoint,
         handler: new ProxySessionManager(CreateReader()),
         backlog: ServiceConfiguration.Server.ConnectionBacklog);
     _server.Start();
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: simoneb/ak-f1-timing
 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();
     }
 }