node.js - 用socket.io实现一个websocket server

查看:106
本文介绍了node.js - 用socket.io实现一个websocket server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

据说socket.io 实现了websocket协议,但网上的例子中客户端都是以ip地址和端口号方式连接的,不应该是ws://....吗?

  • 能不能实现这样连接?ws://...

  • 如果能的话请给一个?

我想实现的是:

  1. 基于node.js 建一个websocket服务器

  2. ios客户端可以连接互发数据

解决方案

Note: Socket.IO is not a WebSocket implementation ... That is why a WebSocket client will not be able to successfully connect to a Socket.IO server, and a Socket.IO client will not be able to connect to a WebSocket server ...

-- README.md

这篇关于node.js - 用socket.io实现一个websocket server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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