package websocket-lwt-unix

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

a >>= b will pass the result of a to the b function. This is a monadic bind.

val return : 'a -> 'a Cohttp_lwt_unix.IO.t

return a will construct a constant IO value.

type conn

conn represents the underlying network flow

val read_line : Cohttp_lwt_unix.IO.ic -> string option Cohttp_lwt_unix.IO.t

read_line ic will read a single line terminated by CR or CRLF from the input channel ic. It returns None if EOF or other error condition is reached.

val read : Cohttp_lwt_unix.IO.ic -> int -> string Cohttp_lwt_unix.IO.t

read ic len will block until a maximum of len characters are read from the input channel ic. It returns an empty string if EOF or some other error condition occurs on the input channel, and can also return fewer than len characters if input buffering is not sufficient to satisfy the request.

val write : Cohttp_lwt_unix.IO.oc -> string -> unit Cohttp_lwt_unix.IO.t

write oc s will block until the complete s string is written to the output channel oc.

flush oc will return when all previously buffered content from calling write have been written to the output channel oc.