-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove-handle-type-param: approach has been abandoned
The handle parameter of a server connection was originally intended to support upgrades within the HTTP state machine. This approach was never actually tested for feasiblity. In the mean time a different approach of building support for upgrading into the runtime has been tested for feasiblity, and will be adopted instead.
- Loading branch information
Showing
6 changed files
with
48 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
open Httpaf | ||
|
||
|
||
(* The function that results from [create_connection_handler] should be passed | ||
to [Lwt_io.establish_server_with_client_socket]. For an example, see | ||
[examples/lwt_echo_server.ml]. *) | ||
module Server : sig | ||
type request_handler = | ||
Lwt_unix.file_descr Httpaf.Server_connection.request_handler | ||
|
||
val create_connection_handler | ||
: ?config : Httpaf.Config.t | ||
-> request_handler : (Unix.sockaddr -> request_handler) | ||
-> error_handler : (Unix.sockaddr -> Httpaf.Server_connection.error_handler) | ||
-> (Unix.sockaddr -> Lwt_unix.file_descr -> unit Lwt.t) | ||
: ?config : Config.t | ||
-> request_handler : (Unix.sockaddr -> Server_connection.request_handler) | ||
-> error_handler : (Unix.sockaddr -> Server_connection.error_handler) | ||
-> Unix.sockaddr | ||
-> Lwt_unix.file_descr | ||
-> unit Lwt.t | ||
end | ||
|
||
(* For an example, see [examples/lwt_get.ml]. *) | ||
module Client : sig | ||
val request | ||
: ?config : Httpaf.Config.t | ||
: ?config : Httpaf.Config.t | ||
-> Lwt_unix.file_descr | ||
-> Httpaf.Request.t | ||
-> error_handler : Httpaf.Client_connection.error_handler | ||
-> response_handler : Httpaf.Client_connection.response_handler | ||
-> [`write] Httpaf.Body.t | ||
-> Request.t | ||
-> error_handler : Client_connection.error_handler | ||
-> response_handler : Client_connection.response_handler | ||
-> [`write] Httpaf.Body.t | ||
end |