sta / websocket-sharp

A C# implementation of the WebSocket protocol client and server
http://sta.github.io/websocket-sharp
MIT License
5.63k stars 1.65k forks source link

localhost vs remote connection #95

Open jg33 opened 9 years ago

jg33 commented 9 years ago

Hi-

I'm having an odd issue when I try to connect to a remote node.js server running websockets. When I run it locally, unity can connect to it perfectly. However, when I run it remotely, it fails to connect. I thought it was a problem with the settings on the remote server, but when I run another app (written in OpenFrameworks) on the same computer as the Unity client, it can connect to it just fine.

Any idea what it could be? Thanks!

-jesse

sta commented 9 years ago

Hello there,

Is it possible to connect to the following url with your app, such as

var ws = new WebSocket ("ws://echo.websocket.org");
ws.Connect ();

And doesn't something firewall software work to your app in your environment?

And also if you build your app as a webplayer app, you must add some settings for it.

So, could you describe your environment more?

jg33 commented 9 years ago

Hrm- I can get it to echo, but not connect to my server, so I guess it could be something weird with my server.

Right now, the setup is- Unity (playing in the IDE) connecting to a node.js server running ws. The server periodically sends cues and time information. There is also an OF app on the same computer connecting to the same server for cueing and time information. Eventually, it is going to be an iOS app connecting to a server running on a local network.

Could it be that I have two apps on one computer trying to connect to the same server/port?

Thanks again!