-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #124 from inhabitedtype/lwt-unix
rename httpaf-lwt package to httpaf-lwt-unix
- Loading branch information
Showing
12 changed files
with
108 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
open Base | ||
open Httpaf_lwt | ||
open Httpaf_lwt_unix | ||
module Arg = Caml.Arg | ||
|
||
let main port = | ||
|
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,7 +1,10 @@ | ||
opam-version: "2.0" | ||
name: "httpaf-lwt" | ||
maintainer: "Spiros Eliopoulos <[email protected]>" | ||
authors: [ "Anton Bachin <[email protected]>" ] | ||
authors: [ | ||
"Anton Bachin <[email protected]>" | ||
"Spiros Eliopoulos <[email protected]>" | ||
] | ||
license: "BSD-3-clause" | ||
homepage: "https://github.com/inhabitedtype/httpaf" | ||
bug-reports: "https://github.com/inhabitedtype/httpaf/issues" | ||
|
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,5 +1,5 @@ | ||
(library | ||
(name httpaf_lwt) | ||
(public_name httpaf-lwt) | ||
(name httpaf_lwt_unix) | ||
(public_name httpaf-lwt-unix) | ||
(libraries faraday-lwt-unix httpaf lwt.unix) | ||
(flags (:standard -safe-string))) |
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
(*---------------------------------------------------------------------------- | ||
Copyright (c) 2018 Inhabited Type LLC. | ||
Copyright (c) 2018 Anton Bachin | ||
All rights reserved. | ||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions | ||
are met: | ||
1. Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
3. Neither the name of the author nor the names of his contributors | ||
may be used to endorse or promote products derived from this software | ||
without specific prior written permission. | ||
THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS | ||
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
POSSIBILITY OF SUCH DAMAGE. | ||
----------------------------------------------------------------------------*) | ||
|
||
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 | ||
val create_connection_handler | ||
: ?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 | ||
-> Lwt_unix.file_descr | ||
-> Request.t | ||
-> error_handler : Client_connection.error_handler | ||
-> response_handler : Client_connection.response_handler | ||
-> [`write] Httpaf.Body.t | ||
end |
This file was deleted.
Oops, something went wrong.