AK.F1.Timing.Server.TcpServer.Start C# (CSharp) Method

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
        public void Start()
        {
            CheckDisposed();
            if(Interlocked.CompareExchange(ref _started, 1, 0) == 0)
            {
                Log.Info("starting");
                InitialiseListener();
                InitialiseAcceptEvent();
                AcceptAsync();
                Log.InfoFormat("started, endpoint={0}", _endpoint);
            }
        }

Usage Example

Example #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();
 }
All Usage Examples Of AK.F1.Timing.Server.TcpServer::Start