projects/Extant_Networking/Host/NetTcpHost.cs
/// <summary>
/// Returns a pending connection or null if none exist.
/// </summary>
Returns a pending connection or null if none exist.
Returns a pending connection or null if none exist .
public INetConnection PollNewConnection()
        {
            lock (_newConnections.Lock)
            {
                while (_newConnections.Value.Count > 0 && !_newConnections.Value.Peek().IsActive)
                    _newConnections.Value.Dequeue().Close(NetConnectionClosingReason.ClosedSelf);
                if (_newConnections.Value.Count > 0)
                    return _newConnections.Value.Dequeue();
                else
                    return null;
            }
        }
public INetConnection PollNewConnection ( ) { lock ( _newConnections . Lock ) { while ( _newConnections . Value . Count > 0 && ! _newConnections . Value . Peek ( ) . IsActive ) _newConnections . Value . Dequeue ( ) . Close ( NetConnectionClosingReason . ClosedSelf ) ; if ( _newConnections . Value . Count > 0 ) return _newConnections . Value . Dequeue ( ) ; else return null ; } }
Returns a pending connection or null if none exist.
Returns a pending connection or null if none exist .