Skip to content

Commit

Permalink
Fix compilation of examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dhouse-js committed May 24, 2021
1 parent 2a36491 commit d45b85c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion examples/async/async_echo_post.ml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ let main port max_accepts_per_batch () =
let where_to_listen = Tcp.Where_to_listen.of_port port in
Tcp.(Server.create_sock ~on_handler_error:`Raise
~backlog:10_000 ~max_connections:10_000 ~max_accepts_per_batch where_to_listen)
(Server.create_connection_handler ~request_handler ~error_handler)
(Server.create_connection_handler
~request_handler
~error_handler
~upgrade_handler:None)
>>= fun _server ->
Stdio.printf "Listening on port %i and echoing POST requests.\n" port;
Stdio.printf "To send a POST request, try one of the following\n\n";
Expand Down
5 changes: 4 additions & 1 deletion examples/lwt/lwt_echo_post.ml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ let main port =
Lwt.async (fun () ->
Lwt_io.establish_server_with_client_socket
listen_address
(Server.create_connection_handler ~request_handler ~error_handler)
(Server.create_connection_handler
~request_handler
~error_handler
~upgrade_handler:None)
>|= fun _server ->
Stdio.printf "Listening on port %i and echoing POST requests.\n" port;
Stdio.printf "To send a POST request, try one of the following\n\n";
Expand Down

0 comments on commit d45b85c

Please sign in to comment.