2 * Copyright (c) 2016, Facebook, Inc.
5 * This source code is licensed under the MIT license found in the
6 * LICENSE file in the "hack" directory of this source tree.
14 exception Client_went_away
16 val provider_from_file_descriptor
: Unix.file_descr
-> t
17 val provider_for_test
: unit -> t
19 val sleep_and_check
: t
->
20 (** Optional persistent client. *)
22 (* Whether the most recent message received from persistent client
25 (** Returns an optional new client, and a boolean for whether there is
26 * a request on the persistent client. *)
28 val accept_client
: t
-> client
29 val read_connection_type
: client
-> ServerCommandTypes.connection_type
30 val send_response_to_client
: client
-> 'a
-> float -> unit
31 val send_push_message_to_client
: client
-> ServerCommandTypes.push
-> unit
32 val client_has_message
: client
-> bool
33 val read_client_msg
: client
-> 'a
ServerCommandTypes.command
34 val make_persistent
: client
-> client
35 val is_persistent
: client
-> bool
36 val shutdown_client
: client
-> unit
37 val ping
: client
-> unit
39 (* TODO: temporary way to break the module abstraction. Remove after
40 * converting all the callsites to use methods on this module instead of
41 * directly using channels. *)
42 val get_channels
: client
-> Timeout.in_channel
* out_channel