Skip to content

Commit

Permalink
WebSocket: server and client handlers now equal
Browse files Browse the repository at this point in the history
Since anmonteiro/httpun-ws#39, the equality
of the server and client connection handler types has been exposed. Can
now use Dream's connection handlers directly, without an Obj.magic
cast.

See also aantron/dream#181.
  • Loading branch information
aantron committed Nov 10, 2023
1 parent f8b380a commit db33e97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/http/websocket.ml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ let ws socket request =
Message.response ~status:`Switching_Protocols Stream.empty Stream.null in
let (_, server_stream) = Message.create_websocket response in
Lwt.wakeup_later receive_response response;
Dream_httpaf.Websocket.client_websocket_handler server_stream socket
Dream_httpaf.Websocket.websocket_handler server_stream socket
in

let%lwt client =
Expand Down

0 comments on commit db33e97

Please sign in to comment.