开发者

Are there any Node WebSocket Server javascript client libraries?

开发者 https://www.devze.com 2023-03-21 08:07 出处:网络
I\'m using the node WebSocket Server ( http://static.brandedcode.com/nws-docs/ ) in nodejs for websockets and one java client using this websocket client https://github.com/TooTallNate/Java-WebSocket.

I'm using the node WebSocket Server ( http://static.brandedcode.com/nws-docs/ ) in nodejs for websockets and one java client using this websocket client https://github.com/TooTallNate/Java-WebSocket. I couldn't use socket.io as a server because i couldn't find any java clients for it. Now i've searched for a javascript client for Websocket server, and can't find any. Anyone know of any generic web so开发者_C百科cket clients in javascript? The socket.io client is not connecting to this server. Thanks for any help.


javascript client for Websocket server

It's called window.WebSocket.

If you want fallbacks and browser support (The thing socket.io is good at!)

Try

  • web-socket-js
  • Atmosphere (A completely different framework)

I couldn't use socket.io as a server because i couldn't find any java clients for it

Read the socket.io source, write a Java WebSocket client for it. It should only be a thin abstraction ontop of your Java-Websocket.

Personal advice is to make Java support socket.io. Although I don't see why your doing Java - node.js communication over websockets instead of tcp or udp. The latter two are probably better

0

精彩评论

暂无评论...
验证码 换一张
取 消