private EndInitializeConnection ( IAsyncResult result ) : void | ||
result | IAsyncResult | |
Résultat | void |
private void InitializeConnection() { IAsyncResult result = _connection.BeginInitializeConnection(_host, _port, InitializeConnectionCallback, this); if (result.CompletedSynchronously) { try { _connection.EndInitializeConnection(result); if (NetEventSource.IsEnabled) { NetEventSource.Info(this, "Connect returned"); } Handshake(); } catch (Exception e) { InvokeCallback(e); } } }
private void InitializeConnection() { IAsyncResult result = _connection.BeginInitializeConnection(_host, _port, InitializeConnectionCallback, this); if (result.CompletedSynchronously) { _connection.EndInitializeConnection(result); if (GlobalLog.IsEnabled) { GlobalLog.Print("ConnectAndHandshakeAsyncResult#" + LoggingHash.HashString(this) + "::Connect returned" + LoggingHash.HashString(this)); } try { Handshake(); } catch (Exception e) { InvokeCallback(e); } } }