Module Zmq.Msg
type ttype bigstring= (char, Stdlib.Bigarray.int8_unsigned_elt, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array1.t
val init_data : ?offset:int -> ?length:int -> bigstring -> tInitialize a new message with the given data. The data will be kept alive for the lifetime of the message.
- parameter offset
specifies an offset from the start of the given block to use. Defaults to
0.
- parameter length
specifies the number of bytes, starting from
offset, to use. Defaults thelength of data - offset.
val size : t -> intSize of the message in bytes
val unsafe_data : t -> bigstringRetrieve the data contained in the message.
This is considered unsafe because the underlying data may be freed when the message's lifetime expires.
val close : t -> unitFree the message. This will be done automatically when the message is garbage collected.
val gets : t -> string -> stringRetrieve a property attached to a message. Property are simple strings. Example of properties include: "Socket-Type", "Identity", "Resource", but underlying transport and security mechanism may add more.