Friday 2 June 2017

Socket IO Won't work on public IP, Works fine localhost

So I am using socket io and I have successfully implemented all code locally.

To connect client side, I am using :

var socket = io.connect(window.location.origin + ":3333");

for scalability. Server side I am using

var express = require("express"),
app = express,
http = require("http"),
server = http.createServer(app),
io = require("socket.io").listen(server),
request = require("request");
server.listen(3333, '0.0.0.0');

and I have verified my app is up an running on the server by performing an nmap on :3333.

But I keep getting ERR_CONNECTION_TIMED_OUT on the client.

Any suggestions?



via Loveen Dyall

No comments:

Post a Comment