public void Start() { SocketString listener = new SocketString(new Socket(SocketType.Stream, ProtocolType.Tcp)); listener.Bind(serverIP); listener.Listen(10); while (true) { SocketString handler = listener.Accept(); Logger.Log.Add($"new client {handler.RemoteEndPoint}"); new Task(new ClientHandler(handler).Run).Start(); } }
public ClientHandler(SocketString handler) { this.handler = handler; }