package zmq

  1. Overview
  2. Docs
OCaml bindings for ZeroMQ 4.x

Install

Dune Dependency

Authors

Maintainers

Sources

zmq-5.2.2.tbz
sha256=13b74e6a50f56485ef0d563a2d2275c53d2f5b51d638f204412df794a66dff61
sha512=a47a6def598c1d514a86dbe0918aeb7d8f04da9af7456f4654f77717264c403d784b99552a7dd5f0e4597c5df01dbe16e8db9a47b41bd3f408efc4cb5a93874a

doc/zmq/Zmq/Msg/index.html

Module Zmq.MsgSource

Sourcetype t
Sourceval init_data : ?offset:int -> ?length:int -> bigstring -> t

Initialize 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 the length of data - offset.

Sourceval size : t -> int

Size of the message in bytes

Sourceval copy_data : t -> bigstring

Retrieve a copy of the data contained in the message.

Sourceval unsafe_data : t -> bigstring

Retrieve the data contained in the message.

This is considered unsafe because the underlying data may be freed when the message's lifetime expires.

Sourceval close : t -> unit

Free the message. This will be done automatically when the message is garbage collected.

Sourceval gets : t -> string -> string

Retrieve 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.

OCaml

Innovation. Community. Security.