Java implementation for client Socket.io compatible with version 1.0

我是研究僧i 提交于 2019-12-29 07:15:18

问题


It is almost 1 week that I am wasting time trying to find a WORKING library that implements the client side of Socket.IO compatible with v. 1.0

Mentioning just the most relevant results...so far I found: 1. https://github.com/nkzawa/socket.io-client.java which I compiled (not without difficulties) and tried to link to my project without success since it gives me an error on the Emitter class that I couldn't solve. 2. https://github.com/Gottox/socket.io-java-client that is compatible till version 0.9 and seems no longer maintained.

Has anyone found an implementation working with v. 1.0(and has tried it)? Or do you advice me to downgrade to versione 0.9? Just to be more specific, I need it to keep the sync between my Android app and my server.

Thanks for your help!


回答1:


I had the exact same problem and I got nkzawa's solution working. You need to install quite a few dependencies if you aren't using Maven

Necessary:

  • engine.io-client
  • Java-Websocket
  • json

Unnecessary:

  • hamcrest-library
  • jsonassert
  • junit

Also don't forget socket.io-client!



来源:https://stackoverflow.com/questions/24386302/java-implementation-for-client-socket-io-compatible-with-version-1-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!