Open pampas93 opened 6 years ago
Tips: check the server port, and whether allowed by firewall.
This is an online hosted server and connects when I tested on the socket.io client tool. This is my code,
socket = IO.Socket("https://socket-unity.herokuapp.com/");
socket.On(Socket.EVENT_CONNECT, () => {
Debug.Log("Connected to server socket");
});
Is there any online hosted socket.io url that I can test with my Unity?
I see https://, but this plugin only support http so far.
I used Heroku too, juste replace "https://socket-unity.herokuapp.com/" by ""ws://socket-unity.herokuapp.com/", it's work for me. The first connection can also takes time if the server was in "sleeping mode", just wait for it to start.
Perfect. It works like a charm. Thanks
I hosted a server on heroku (node.js) which emits time in intervals (testing). It works when I test on http://amritb.github.io/socketio-client-tool/ but fails to connect while I run from Unity. local servers connect and receive data, but fails to connect to the server hosted on heroku.
This is the URL: https://socket-unity.herokuapp.com/
Any issue or I must be doing something wrong