Example #1
0
 public ClientObject(TcpClient tcpClient, ServerObject serverObject)
 {
     Id = Guid.NewGuid().ToString();
     client = tcpClient;
     server = serverObject;
     serverObject.AddConnection(this);
 }
Example #2
0
 static void Main(string[] args)
 {
     try
     {
         server = new ServerObject();
         listenThread = new Thread(new ThreadStart(server.Listen));
         listenThread.Start(); 
     }
     catch (Exception ex)
     {
         server.Disconnect();
         Console.WriteLine(ex.Message);
     }
 }
Example #3
0
 static void Main(string[] args)
 {
     try
     {
         server       = new ServerObject();
         listenThread = new Thread(new ThreadStart(server.Listen));
         listenThread.Start();
     }
     catch (Exception ex)
     {
         server.Disconnect();
         Console.WriteLine(ex.Message);
     }
 }