Can i use Socket.io with Spring-boot?

我们两清 提交于 2021-01-27 04:21:44

问题


I am gonna develop a real time game for andriod/ios and i need a server which transmit data with client real time. Can i use socket.io with Spring boot? Or if the answer is no , using websockets with Spring boot is the solution?


回答1:


Probably this library could be useful for your needs.

By the way Socket.io will try to use WebSocket API. In case if it's not supported by the browser then Socket.io will gracefully fallback to something else.




回答2:


The original Socket.IO server is designed to be used in Javascript, mostly Node.

Yet, there are other implementations of the Socket.IO server for other languages.

For Java, there is the Netty-socketio project, an open-source Java implementation of the Socket.IO server, based on the Netty Java server framework (the Netty-socketio project is also suggested in this answer).

This example Spring Boot application uses Netty-socketio to provide a Socket.IO server within a Spring Boot application.

So yes, you can use (on open-source Java implementation) of Socket.IO together with Spring Boot.



来源:https://stackoverflow.com/questions/57505589/can-i-use-socket-io-with-spring-boot

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