Moonpool_lwt.TCP_servertype t = Lwt_io.serverval establish_lwt :
?backlog:int ->
?no_close:bool ->
runner:Moonpool.Runner.t ->
Unix.sockaddr ->
(Unix.sockaddr -> Lwt_io.input_channel -> Lwt_io.output_channel -> unit) ->
testablish ~runner addr handler runs a TCP server in the Lwt thread. When a client connects, a moonpool fiber is started on runner to handle it.
val establish :
?backlog:int ->
?no_close:bool ->
runner:Moonpool.Runner.t ->
Unix.sockaddr ->
(Unix.sockaddr -> IO_in.t -> IO_out.t -> unit) ->
tLike establish_lwt but uses IO to directly handle reads and writes on client sockets.
val shutdown : t -> unitShutdown the server