module Config:sig..end
before before calling its callback to prepare a packet
buffer for reading and after afterwards to prepare for writing (for the next
iteration).
One can specify ~before:ignore or ~after:ignore to disable the default action, as
when doing buffer management in the callback. One can also specify an action, such as
~after:Iobuf.compact for use with read_loop on a connection-oriented socket or
file. It's often convenient to use the same interface for UDP, TCP, and file variants
of the same protocol.
type t = {
|
capacity : |
|
init : |
|
before : |
|
after : |
val after : t -> Udp.write_buffer -> unitval before : t -> Udp.write_buffer -> unitval init : t -> Udp.write_bufferval capacity : t -> intmodule Fields:sig..end
val create : ?capacity:int ->
?init:Udp.write_buffer ->
?before:(Udp.write_buffer -> unit) ->
?after:(Udp.write_buffer -> unit) -> unit -> t