Duppy.IoType for markers. Split s recognizes all regexp allowed by the Re.Pcre module.
Different types of failure. Io_error is raised when reading or writing returned 0, which usually means the socket was closed.
exception Error of failureRaised by read and write. On a read, whatever had been read before the failure is left in the handle's data.
data holds what a read consumed past its marker, which the next read on the same socket picks up.
read ?timeout ~priority h marker returns the data up to marker, parking the computation until enough of it has arrived.
val write :
?timeout:float ->
?offset:int ->
?length:int ->
priority:'a ->
'a handle ->
Stdlib.Bytes.t ->
unitwrite ?timeout ~priority h data writes all of data, parking until the socket accepts it.