Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- listener = new TcpListener(IPAddress.Any, 80);
- var currentAcceptTcpClient = listener.BeginAcceptTcpClient(null, null);
- while (true)
- {
- foreach (TcpClient client in clients)
- {
- if (client.Available > 4)
- {
- //BLABLA PROCESS SHIT
- }
- }
- if (currentAcceptTcpClient.IsCompleted)
- {
- clients.Add(listener.EndAcceptTcpClient(currentAcceptTcpClient));
- currentAcceptTcpClient = listener.BeginAcceptTcpClient(null, null);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment