Module Versioned_typed_tcp.Make.Server

module Server: sig .. end

type t = {
   tail :(Remote_name.t, Recv.t) Versioned_typed_tcp.Server_msg.t Import.Tail.t;
   logfun :Versioned_typed_tcp.Make.logfun option;
   connections :Connections.t;
   mutable am_listening :bool;
   socket :([ `Bound ], Import.Socket.Address.Inet.t) Import.Socket.t;
   warn_free_connections_pct :float;
   mutable free_connections :int;
   mutable when_free :unit Import.Ivar.t option;
   max_clients :int;
   is_client_ip_authorized :string -> bool;
   my_name :My_name.t;
   enforce_unique_remote_name :bool;
   now :unit -> Core.Std.Time.t;
   mutable num_accepts :Core.Std.Int63.t;
}
val invariant : t -> unit
val flushed : t ->
cutoff:unit Async_core.Deferred.t ->
([> `Flushed of Remote_name.t Core.Std.List.t ] *
[> `Not_flushed of Remote_name.t Core.Std.List.t ])
Async_core.Deferred.t
val send : t ->
Remote_name.t ->
Send.t -> [> `Dropped | `Sent of Core.Std.Time.t ] Async_core.Deferred.t
val send_ignore_errors : t -> Remote_name.t -> Send.t -> unit
val send_to_all : t ->
Send.t -> [ `Dropped | `Partial_success | `Sent ] Import.Deferred.t
val send_to_all_ignore_errors : t -> Send.t -> unit
val send_to_some : t ->
Send.t ->
Remote_name.t list ->
[ `Dropped | `Partial_success | `Sent ] Import.Deferred.t
val send_to_some_ignore_errors : t -> Send.t -> Remote_name.t list -> unit
val close : t -> Remote_name.t -> unit
val listen : t ->
(Remote_name.t, Recv.t) Versioned_typed_tcp.Server_msg.t Import.Tail.Stream.t
val listen_ignore_errors : ?stop:unit Import.Deferred.t ->
t -> Recv.t Import.Stream.t
val create : ?logfun:Versioned_typed_tcp.Make.logfun ->
?now:(unit -> Core.Std.Time.t) ->
?enforce_unique_remote_name:bool ->
?is_client_ip_authorized:(string -> bool) ->
?warn_when_free_connections_lte_pct:float ->
?max_clients:int ->
listen_port:int ->
My_name.t -> t Import.Deferred.t
val port : t -> int
val client_send_version : t ->
Remote_name.t -> Versioned_typed_tcp.Version.t option