public void CreateTcpListener(int port, string peerId, string infoHash, byte[] infoHashBytes) { if (Socketeer == null) { Socketeer = new Socketeer(port, peerId, infoHash, infoHashBytes); } }
public void Close() { if (Socketeer != null) { Socketeer.Dispose(); Socketeer = null; } if (Socket != null) { Socket.Close(); Socket.Dispose(); Socket = null; } }