Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
169 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 Reply

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...