Can't connect to my IP using Socket

后端 未结 3 1254
生来不讨喜
生来不讨喜 2020-12-21 06:48

the server throws this error \"Attempting to deserialize an empty stream\" at server side in this line when I run the server: this.tcpListene

3条回答
  •  失恋的感觉
    2020-12-21 07:05

    I've same problem and I'm also behind router and firewall. I found that with your code localhost (127.0.0.1) works perfect but as soon as we try to connect to remote host it gives an error. Solution is change your server side code as follows:

    tcpListener = new TcpListener(IPAddress.Any, 8001);
    

    Hope this will help you...

提交回复
热议问题