How do I fix the error “Only one usage of each socket address (protocol/network address/port) is normally permitted”?

ListenForClients is getting invoked twice (on two different threads) – once from the constructor, once from the explicit method call in Main. When two instances of the TcpListener try to listen on the same port, you get that error.

Leave a Comment