Dżyszla wrote: Nevertheless, check that there is actually a watch. Do you run the server normally or from the debugger?
In general - why the option to enter an address in the server? After all, he must always have localhost / 127.0.0.1. And I would just use IPAddress.Parse ("127.0.0.1") instead of asking the DNS. I also understand that in the server console you let it go further (Read - rather unnecessary at all).
I made the option of adding my own IP so that later I could connect computers from outside the network. (By port forwarding, or ngroka or hamachi). I set up what you said and in netstat you could see 127.0.0.1:9081 (this is the port I created this time) LISTENING, but there is another problem. When I send a message from the Client, the server receives nothing. After doing netstat -an, I saw something like this again.
TCP 127.0.0.1:9081 0.0.0.0:0 LISTENING TCP 127.0.0.1:9081 127.0.0.1:2531 CLOSE_WAIT TCP 127.0.0.1:9081 127.0.0.1:2532 CLOSE_WAIT TCP 127.0.0.1:9081 127.0.0.1:2540 CLOSE_WAIT TCP 127.0.0.1:9081 127.0.0.1:2541 CLOSE_WAIT TCP 127.0.0.1:9081 127.0.0.1:2542 CLOSE_WAIT TCP 127.0.0.1:9081 127.0.0.1:2543 CLOSE_WAIT TCP 127.0.0.1:9081 127.0.0.1:2544 CLOSE_WAIT TCP 127.0.0.1:9081 127.0.0.1:2545 CLOSE_WAIT TCP 127.0.0.1:9081 127.0.0.1:2547 CLOSE_WAIT TCP 127.0.0.1:9081 127.0.0.1:2551 CLOSE_WAIT TCP 127.0.0.1:9081 127.0.0.1:2552 CLOSE_WAIT TCP 127.0.0.1:9081 127.0.0.1:2553 CLOSE_WAIT TCP 127.0.0.1:9081 127.0.0.1:2554 CLOSE_WAIT TCP 127.0.0.1:9081 127.0.0.1:2557 CLOSE_WAIT