Esempio n. 1
0
 public void Send <T>(T socketData) where T : AbstractSocketData, new()
 {
     if (socketData == null)
     {
         return;
     }
     if (this.ipAddress == null || this.ipAddress.Equals(System.Net.IPAddress.Any))
     {
         throw new System.ArgumentException("The IpAddress is uncertain.");
     }
     if (this.port <= 0)
     {
         throw new System.ArgumentException("The Port was not set.");
     }
     ThreadCreator.StartThread(new System.Threading.ParameterizedThreadStart(this.baseSend), socketData, true);
 }
Esempio n. 2
0
 public void Listening()
 {
     this.thread = ThreadCreator.StartThread(new System.Threading.ThreadStart(this.baseListen), true);
 }