コード例 #1
0
 public void CreateTcpListener(int port, string peerId, string infoHash, byte[] infoHashBytes)
 {
     if (Socketeer == null)
     {
         Socketeer = new Socketeer(port, peerId, infoHash, infoHashBytes);
     }
 }
コード例 #2
0
 public void Close()
 {
     if (Socketeer != null)
     {
         Socketeer.Dispose();
         Socketeer = null;
     }
     if (Socket != null)
     {
         Socket.Close();
         Socket.Dispose();
         Socket = null;
     }
 }