Beispiel #1
0
 static void Main(string[] args)
 {
     try
     {
         serverObject = new ServerObject();
         thread       = new Thread(new ThreadStart(serverObject.Listen));
         thread.Start();
     }
     catch (Exception e)
     {
         serverObject.CloseSocket();
         Console.WriteLine(e.Message);
     }
 }
Beispiel #2
0
 public ClientObject(ServerObject server, Socket socket)
 {
     this._server = server;
     server.AddUser(this);
     this.socket = socket;
 }