0

I am making a simple chat system with unity using WebSocketSharp.

ws = new WebSocket("ws://localhost:8088/Laputa"); 

works. I mean, with localhost, running two of this program can do what is expected to do.

but remote address (xxx.xxx.xxx.xxx), which is actually the global address of the PC where both client and server parts are running does not work.

ws = new WebSocket("ws://xxx.xxx.xxx.xxx:8088/Laputa"); 

doesn't works.

I checked that 8088 is not blocked by the router, and checked/disabled firewall and anti-virus software.

But nothing works!

I know that this is a network setting problem, not a coding issue.

Could you give me any advice??

nyi
  • 3,123
  • 4
  • 22
  • 45
  • Does your server bind() to "localhost:8088" or just ":8088"? It should be the latter. – Gene S Apr 24 '18 at 14:37
  • sereverside: wssv = new WebSocketServer (System.Net.IPAddress.Any, 8088) this worked in locahost wssv = new WebSocketServer (8088) this also worked System.Net.IPAddress serverAdress = System.Net.IPAddress.Parse("xxx.xxx.xxx.xxx"); wssv = new WebSocketServer (serverAdress, 8088); this didn't work. – user3626003 Apr 25 '18 at 00:31
  • wssv = new WebSocketServer ( 8088 ) didnt work either. – user3626003 Apr 25 '18 at 01:29

0 Answers0