Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
161 views
in Technique[技术] by (71.8m points)

javascript - Using socket.io standalone without node.js

(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) )
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...