Atmosphere socket established but no data being received/sent

好久不见. 提交于 2019-12-09 07:43:28

I finally figured out that the problem wasn't with the code or atmosphere, but with Glassfish.

The solution is to enable web sockets using the following command:

asadmin set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.websockets-support-enabled=true

Make sure that you run the command using the command prompt. I previously enabled web sockets via the admin gui and somehow it seems to not have been applied correctly. After I ran the above command and tried the above code it worked fine.

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