Is ReST over websockets possible?

前端 未结 8 1013
梦如初夏
梦如初夏 2020-12-13 03:43

I am planning to develop a web based chat application which takes in ReSTful requests, translate them to XMPP and deliver them to an XMPP server.

Using websockets fo

8条回答
  •  既然无缘
    2020-12-13 04:08

    I created a project that adds callbacks to the web socket send function: https://github.com/ModernEdgeSoftware/WebSocketR2

    Message IDs are established so the client can implement callbacks. It handles message retries after timeouts as well as reconnects to the server if the connection gets dropped. You can then structure you payload to be as RESTful as you want by adding verbs and paths.

    This is similar to when a video game studio uses UDP to achieve the speeds they need, but their net code implements a lot of TCP like features for reliability.

提交回复
热议问题