package zmq

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

Install

Dune Dependency

Authors

Maintainers

Sources

zmq-5.1.2.tbz
sha256=04e6278336a8bd3d24215912b8de129673675a5fd84acaa969a30b8c93aba05f
sha512=26ecf349651a1ff67df6c5e39d7f9bc27831da2dcbbad660c7293dd0e2e8cbeaf0b5bc8d9b1842db55e1d237581d42136f1e817b1fb018ad3d65840e356f59e1

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.