-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
We need a way to support websockets.
For httpaf we can use this to upgrade the connection: https://github.com/anmonteiro/httpaf/blob/fork/lib/httpaf.mli#L640.
For h2 we can just take the TCP connection and do the same thing, if we want to support it at all.
The biggest problem is how to build the API.
My current thought is that we should add a function to the request to get hold of a socket (basically a way to send and receive data, maybe via Lwt_stream.t). And then to close the connection we return the response, but that might feel weird since we've actually already responded.
Another solution would be to have a Socket body that does the same thing but then the term body is overloaded.
baransu, tcoopman and cironunes
Metadata
Metadata
Assignees
Labels
No labels