如何在 Tomcat 7 上实现 Socket.io [英] how to implement Socket.io on Tomcat 7
问题描述
我们有托管在 tomcat 6 上的现有应用程序,我们正在转向提供 websockets 支持的 tomcat 7.
We have existing applications which are hosted on tomcat 6 and we are moving to tomcat 7 which provides websockets support.
我想在我们的应用程序中尝试 socket.io,用于基于 websockets 的一些功能,因为它具有非常好的跨浏览器支持.
I wanted to try socket.io in our application, for some of the features based on websockets, since it has very good cross browser support.
我在网上找不到这个组合的任何资源,socket.io + tomcat,虽然有很多 (Socket.io + 码头).
I couldn't find any resources online for this combination, socket.io + tomcat,though there are quite a few for (Socket.io + jetty).
有人试过吗?
推荐答案
虽然没用过,但是推荐Atmosphere项目在JVM上开发socket.io应用.他们的支持建立在 Atmosphere API 之上,该 API 由 Servlet 3 规范和所有大多数特定于服务器的功能提供支持.这意味着,您无需坚持使用 Tomcat 7 即可在 JVM 上使用 socketio.
Though I haven't used, I recommend the Atmosphere project to develop socket.io application on the JVM. Their support is built on top of Atmosphere API which is powered by Servlet 3 spec and all most server-specific features. That means, you don't need to stick Tomcat 7 to use socketio on the JVM.
http://jfarcand.wordpress.com/2012/06/04/writing-socket-io-application-that-runs-on-the-jvm/
这篇关于如何在 Tomcat 7 上实现 Socket.io的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!