w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Node.js and socket.io : Can not communicate server/client via Websocket

I have used socket io with express on a project before, but i have never had this issue. I can share the code that i have with you which this

var io = require('socket.io');
var io_connection = io.listen(server, {
origins: '*:*',
log: true,
'heartbeat timeout': 6000,
'close timeout': 6000,
'log level': 3,
'transports': [

.on('connection', function(socket) {
  user(socket); // bind user socket connection
  poll(socket); // bind user's socket to poll related sockets


return io;

Hope it helps

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.