taking an HTTP connection actor and returning
the Props for a WebSocketServerWorker
implementation. WebSocketComboWorker is
provided to simplify the implementation of
REST/WebSocket servers. Note that a new actor
is created to serve every request (so there is
no need to apply the netaporter pattern in
Spray Route rules).
Spawns and registers WebSocket-capable worker actors with each new HTTP connection. A convenience is provided in the companion to create a new web socket server.
Caveats:
1. Not possible to use IO(Http) and IO(Uhttp) in an ActorSystem: https://github.com/wandoulabs/spray-websocket/issues/44 Use the bundled pipelining instead of the Spray Client one (there may be other third party libraries that use IO(Http))
2. An upgrade request on any path is valid (not restricted): https://github.com/wandoulabs/spray-websocket/issues/67
3. Backpressure is implemented as a hack, because wandoulabs didn't consider this to be an important feature. https://github.com/wandoulabs/spray-websocket/issues/68