Not able to connect Node.JS Sever using Socket.io in Windows from a Linux System in LAN where client(using C++) is running

58 views
Skip to first unread message

Pradyot Hota

unread,
Sep 19, 2015, 3:08:43 PM9/19/15
to nodejs
Hello Everyone,,
I was going through some projects using Node.JS and Socket.io, Now, i am doing something similar where i have written a client application in C++ using Websockets trying to connect a Node.js/Socket.IO server running in a LAN connectivity. I found the server application is not responding at all. I tried a couple of other options from client side eventually getting no response from the server. Basically, i am trying to send a JSON object to the system running SocketIO server.
From Client Side i am trying to connect to server using :: connect ws://localhost:3000 , Server is listening on port 3000. I find no response on to  the server part.

Help, is really appreciated. Thank you.

boby rahmawan

unread,
Sep 22, 2015, 2:34:05 AM9/22/15
to nod...@googlegroups.com

Hi Pradyot, would u like to show us your sample code? And the error if any. Thanks

--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/f2e41444-48a3-481e-9496-223f448d41c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jimb Esser

unread,
Sep 24, 2015, 11:24:08 AM9/24/15
to nodejs
Socket.IO and WebSockets are not the same thing.  Socket.IO is a layer on top of WebSockets (and other transport layers).  If you're using vanilla WebSockets in C++, you will not be able to send messages to a Socket.IO server (Socket.IO needs to do some handshaking and heartbeating and wrapping messages in appropriate ways).

If you just want WebSockets (and not all of the fallbacks for old browsers using other transports Socket.IO provides), you may want to simply use WebSockets.  The ws library is pretty standard (and is, I think, what Socket.IO uses for it's own WebSockets layer).

Hope this helps,
  Jimb Esser
Reply all
Reply to author
Forward
0 new messages