简体   繁体   English

Socket.IO兼容性

[英]Socket.IO compatibility

I have an existing web socket server (built in nodejs) that's using Socket.IO version 0.9.17 and there's already an existing app using it. 我有一个使用Socket.IO 0.9.17版的现有Web套接字服务器(内置在nodejs中),并且已经有一个使用它的现有应用程序。

Now, my problem is that for Android, we cannot find any Socket.IO (Java) client that's compatible with the version I am using in the server. 现在,我的问题是,对于Android,我们找不到与我在服务器中使用的版本兼容的任何Socket.IO(Java)客户端。

On the client-side also (html/js), I tried to test it using the native Javascript WebSocket class but was not able to establish connection with the following error: 同样在客户端(html / js)上,我尝试使用本机Javascript WebSocket类对其进行测试,但由于以下错误而无法建立连接:

WebSocket connection to 'ws://localhost:3009/' failed: Connection closed before receiving a handshake response

Any ideas? 有任何想法吗? alternatives? 备择方案?

You can use socket.io java client which is an official client from socket.io team. 您可以使用socket.io java客户端,它是socket.io团队的正式客户端。 Get it from here: http://mvnrepository.com/artifact/io.socket/socket.io-client 从这里获取: http : //mvnrepository.com/artifact/io.socket/socket.io-client

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM