- Home /
Cannot connect to a server using socket.io (can connect locally).
I am using the following asset to connect to a server using socket.io: https://assetstore.unity.com/packages/tools/network/socket-io-for-unity-21721
Locally, I am able connect to my server using: ws://localhost:52300/index.js/socket.io/?EIO=4&transport=websocket
However, when I try to connect to a server hosted online, I am unable to do so. Here is the link that I am using: ws://www.domain.com/test:52300/socket.io/?EIO=4&transport=websocket
"test" is the root directory of the server.
I am running the server on nodejs, and using the following to listen: var io = require('socket.io')(process.env.PORT || 52300);
Your answer
Follow this Question
Related Questions
Massively Multiplayer Turn Based Game Performance : NodeJS or others ? 0 Answers
Is node js and socket.io a viable option for a real time 2D game? 0 Answers
Need Help in Sending JSONOBJECT to Node Js 1 Answer
Is there a complete tutorial for Nodejs with unity using Socket.io? 2 Answers
Update Method doesn't see value set by other thread 0 Answers