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); } }
public ClientObject(ServerObject server, Socket socket) { this._server = server; server.AddUser(this); this.socket = socket; }