zmq.Utils methods

zmq.Utils class is used to add functionality (like starting proxies and decoding keys) and to obtain additional information (like a version number).

getVersion()

Returns the version number in the form of major.minor.patch:

LET version = ZMQ.Utils.GetVersion()

...

IF version = "4.1.3" THEN

DISPLAY ZMQ.Utils.GetVersion()

Variables data type:

STRING

proxy()

Starts a built-in ZMQ proxy in the current application for connecting a front-end socket to a back-end one:

CALL ZMQ.Utils.Proxy(frontend, backend [, null])

Capture sockets can be used to send all messages received by both the front-end and the back-end:

CALL ZMQ.Utils.Proxy(frontend, backend, capture)

The created  proxies are properly symmetrical and make no difference between the front- and back-ends.

Variables data type:

ZMQ.Socket

generateKeyPair()

Generates a new CURVE key pair:

CALL ZMQ.Utils.GenerateKeyPair(publicKey, secretKey)

A newly-generated random key pair includes a public and a secret key. The caller provides two buffers, each at least 41 octets long, to store the keys. The keys are encoded using z85Encode().

Variables data type:

STRING

z85Decode()

Decodes a binary key from the Z85 printable text:

DISPLAY ZMQ.Utils.z85Decode(publicKey)

or

LET arr = ZMQ.Utils.z85Decode(publicKey)

Variables data type:

DYNAMIC ARRAY of TINYINT

STRING

z85Encode()

Encodes a binary key as a Z85 printable text:

LET str = ZMQ.Utils.z85Encode(arr)

Variables data type:

DYNAMIC ARRAY of TINYINT

STRING

 

Contact Us

Privacy Policy

Copyright © 2025 Querix, (UK) Ltd.