/// <summary> /// 指定した接続待ち受けを終了します。 /// 既に接続されているクライアント接続には影響ありません /// </summary> /// <param name="listener">待ち受けを終了するリスナ</param> public void StopListen(OutputListener listener) { listener.Stop(); Utils.ReplaceCollection(ref outputListeners, orig => { var new_collection = new List <OutputListener>(orig); new_collection.Remove(listener); return(new_collection); }); }
/// <summary> /// 指定した接続待ち受けを終了します。 /// 既に接続されているクライアント接続には影響ありません /// </summary> /// <param name="listener">待ち受けを終了するリスナ</param> /// <remarks>指定したリスナのWANへのリレーが許可されておりIsFirewalledがfalseだった場合にはnullにリセットします</remarks> public void StopListen(OutputListener listener) { listener.Stop(); ReplaceCollection(ref outputListeners, orig => { var new_collection = new List <OutputListener>(orig); new_collection.Remove(listener); return(new_collection); }); if ((listener.GlobalOutputAccepts & OutputStreamType.Relay) != 0) { OnListenPortClosed(); } }
/// <summary> /// 指定した接続待ち受けを終了します。 /// 既に接続されているクライアント接続には影響ありません /// </summary> /// <param name="listener">待ち受けを終了するリスナ</param> /// <remarks>指定したリスナのWANへのリレーが許可されておりIsFirewalledがfalseだった場合にはnullにリセットします</remarks> public void StopListen(OutputListener listener) { listener.Stop(); ReplaceCollection(ref outputListeners, orig => orig.Remove(listener)); }
/// <summary> /// 指定した接続待ち受けを終了します。 /// 既に接続されているクライアント接続には影響ありません /// </summary> /// <param name="listener">待ち受けを終了するリスナ</param> /// <remarks>指定したリスナのWANへのリレーが許可されておりIsFirewalledがfalseだった場合にはnullにリセットします</remarks> public void StopListen(OutputListener listener) { listener.Stop(); Utils.ReplaceCollection(ref outputListeners, orig => { var new_collection = new List<OutputListener>(orig); new_collection.Remove(listener); return new_collection; }); if ((listener.GlobalOutputAccepts & OutputStreamType.Relay)!=0) { OnListenPortClosed(); } }