public ClientHandler(TcpClient newClient, Auktion auktion) { this.newClient = newClient; nWS = newClient.GetStream(); sR = new StreamReader(nWS); sW = new StreamWriter(nWS); this.auktion = auktion; StartClient(); }
public void Run() { Auktion auktion = new Auktion(); TcpListener listener = new TcpListener(IPAddress.Any, 11000); listener.Start(); TcpClient newClient; ClientHandler clientHandler; while (true) { newClient = listener.AcceptTcpClient(); Console.WriteLine("Client Connected !"); clientHandler = new ClientHandler(newClient, auktion); BroadCasting.AddToList(clientHandler); } }