package moonpool-lwt
Module Moonpool_lwt.TCP_serverSource
Source
val 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.
Source
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.