websocket-sharp icon indicating copy to clipboard operation
websocket-sharp copied to clipboard

localhost vs remote connection

Open jg33 opened this issue 11 years ago • 2 comments

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

jg33 avatar Dec 23 '14 16:12 jg33

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?

sta avatar Dec 25 '14 07:12 sta

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!

jg33 avatar Dec 30 '14 15:12 jg33