http-server icon indicating copy to clipboard operation
http-server copied to clipboard

Implicit WebSocket support

Open mpapierski opened this issue 11 years ago • 0 comments

This might be good idea to add implicit support for WebSocket.

Plan:

  • Add "on_upgrade" callback for user that will allow or disallow further processing of possible WebSocket connection
  • Add "on_error" callback to detect possible disconnection of client
  • After upgrading "on_body" should be called with received WebSocket frames
  • User should be aware that the client is upgraded to WebSocket or not (For example: client->is_websocket).
  • Improve "pausing" API to allow pausing after receiving chunk of body to allow further "background processing"
  • Allow possible "opt-out" by disabling WebSocket during compile time.

Possible implementations:

  • https://github.com/tatsuhiro-t/wslay - This library seems to be good at embedding

mpapierski avatar Jan 07 '15 07:01 mpapierski