在没有node.js的情况下使用socket.io standalone [英] Using socket.io standalone without node.js

查看:155
本文介绍了在没有node.js的情况下使用socket.io standalone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(JavaScript新手)

(JavaScript newbie)

我正在尝试构建一个基于JavaScript的客户端应用程序,它通过套接字与服务器应用程序通信。我遇到了 socket.io 。是否可以使用socket.io而没有任何node.js依赖?

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?

我已经克隆了socket.io github并编写了一个简单的客户端html来连接服务器(Can如果需要,发布代码)。但它没有连接到服务器。

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.

(背景信息:我们需要一个在Win32上运行的简单配置客户端实用程序,它与支持套接字通信的自定义服务器通信我们认为HTML / JS / CSS是一个更好的解决方案。为此,我考虑了以下选项:

(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,但需要安装运行时

  2. HTML5 WebSocket:不受广泛支持 - 适用于Chrome但需要IE10

  3. socket.io:试图让它工作

  4. 还有其他什么?
    (如果需要,可以将此问题作为单独的帖子发布)

  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) )


推荐答案

建立成功的Socket.IO,您的自定义服务器必须遵循规范,或使用socket.io的其他服务器实现

< a href =https:// github.com/learnboost/socket.io/wiki\"rel =nofollow> https://github.com/learnboost/socket.io/wiki 其他语言部分包括一些服务器实现socket.io

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

这篇关于在没有node.js的情况下使用socket.io standalone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆