Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using socket.io standalone without node.js

Tags:

(JavaScript newbie)

I am trying to build a JavaScript based client app that communicates with a server app over socket. I came across socket.io. Is it possible to use socket.io without any node.js dependencies?

I have cloned socket.io github and wrote a simple client html to connect to the server (Can post the code if required). But it does not connect to the server.

(Background info: We need a simple config client utility that runs on Win32 that communicates with a custom server that supports socket communication with a custom packet-format protocol. Instead of going through the usual MFC/.NET, we think HTML/JS/CSS makes a better solution. For this purpose, I have considered the following options:

  1. Titanium: Works, but requires runtime to be installed
  2. HTML5 WebSocket: Not widely supported - works on Chrome but requires IE10
  3. socket.io: Trying to get it to work
  4. Any other? (Can post this question as separate thread, if necessary) )
like image 587
gammay Avatar asked Nov 18 '11 12:11

gammay


People also ask

Can I use Socket.IO without node?

Is it possible to use socket.io without any node. js dependencies? The short answer is yes.

Does Socket.IO need a server?

Socket.io, and WebSockets in general, require an http server for the initial upgrade handshake. So even if you don't supply Socket.io with an http server it will create one for you.

Can I use Socket.IO with Java?

IO-client Java. This is the Socket.IO Client Library for Java, which is simply ported from the JavaScript client.

Is Socket.IO part of node?

Socket.IO is a library that enables real-time, bidirectional and event-based communication between the browser and the server. It consists of: a Node.


1 Answers

Establish a successful Socket.IO, your custom server must follow the spec, or use other server implementation of socket.io
https://github.com/learnboost/socket.io/wiki the In other languages part include some servers implementation of socket.io

like image 134
sbugzu Avatar answered Oct 11 '22 00:10

sbugzu