28
edits
No edit summary |
|||
(7 intermediate revisions by 3 users not shown) | |||
Line 37: | Line 37: | ||
2. only limited zmq_getsockopt and zmq_setsockopt is currently implemented. | 2. only limited zmq_getsockopt and zmq_setsockopt is currently implemented. | ||
3. functions mostly return true or false for whether they succeeded or failed. In the C binding, 0 | 3. functions mostly return true or false for whether they succeeded or failed. In the C binding, 0 signified success. | ||
== The functions == | == The functions == | ||
iszmq | |||
Determine whether H is a zeromq socket object. | |||
zmq_bind | zmq_bind | ||
Line 49: | Line 52: | ||
zmq_connect | zmq_connect | ||
Connect a zeromq socket to a endpoint | Connect a zeromq socket to a endpoint | ||
zmq_curve_keypair | |||
Generate a random private/public keypair | |||
zmq_curve_public | |||
Derive the public key from a private key | |||
zmq_disconnect | |||
Disconnect a zeromq socket from an endpoint. | |||
zmq_errno | zmq_errno | ||
Line 55: | Line 67: | ||
zmq_getsockopt | zmq_getsockopt | ||
Get current value of a zeromq socket option. | Get current value of a zeromq socket option. | ||
zmq_has | |||
Check if the zmq library supports a given feature. | |||
zmq_poll | zmq_poll | ||
Line 68: | Line 83: | ||
zmq_setsockopt | zmq_setsockopt | ||
Set a zeromq socket option. | Set a zeromq socket option. | ||
zmq_socket | |||
Create a zeromq socket. | |||
zmq_strerror | zmq_strerror | ||
Line 77: | Line 95: | ||
zmq_version | zmq_version | ||
Get the zeromq library version numbers. | Get the zeromq library version numbers. | ||
zmq_z85_decode | |||
Decode a z85 encoded string to a binary key. | |||
zmq_z85_encode | |||
Encode a binary key as Z85 printable text. | |||
= Examples = | = Examples = | ||
The zeromq package comes with a number of examples included in it. They can be opened in octave using: | |||
>> edit examples/zmq_example1.m | |||
== basic request/reply pattern == | == basic request/reply pattern == | ||
Line 140: | Line 169: | ||
</syntaxhighlight>}} | </syntaxhighlight>}} | ||
== basic publish subscribe == | == basic publish/subscribe pattern == | ||
Example based on client/server example from [http://zguide.zeromq.org/page:all#Getting-the-Message-Out http://zguide.zeromq.org/page:all#Getting-the-Message-Out] | Example based on client/server example from [http://zguide.zeromq.org/page:all#Getting-the-Message-Out http://zguide.zeromq.org/page:all#Getting-the-Message-Out] | ||
Line 211: | Line 240: | ||
[[Category:Octave Forge]] | |||
[[Category:Octave |
edits