c# how to connect multiple clients to a TcpListener
27,862
Take a look at http://csharp.net-informations.com/communications/csharp-multi-threaded-server-socket.htm
If you scroll to the bottom there are other available examples, such as a TCP chat server/client which might be helpful.
Author by
Claudia
Updated on January 03, 2020Comments
-
Claudia over 4 years
I am implementing a game in a WPF application. I need to connect at least 10 players to a server. I have always worked with only one
TcpClient
and oneTcpListener
. Is there any way to connect a lot of clients to a server? I tried to create one thread per connection, but did not work. I have searched and I couldn`t find a simple example that could teach me how to do it.