WaitForRegistration() public method

public WaitForRegistration ( ) : void
return void
Example #1
0
 private void HandleNewConnection(TcpClient tcpClient)
 {
     Task.Run(() =>
     {
         var connection = new UnregisteredConnection(tcpClient);
         Logger.Info($"{connection} connected.");
         connection.OnRegister += UnregisteredConnection_OnRegister;
         UnregisteredConnections.GetOrAdd(connection.Id, connection);
         connection.WaitForRegistration();
     });
 }
 private void HandleNewConnection(TcpClient tcpClient)
 {
     Task.Run(() =>
     {
         var connection = new UnregisteredConnection(tcpClient);
         Logger.Info($"{connection} connected.");
         connection.OnRegister += UnregisteredConnection_OnRegister;
         UnregisteredConnections.GetOrAdd(connection.Id, connection);
         connection.WaitForRegistration();
     });
 }