Next: ZeroMQ socket type constants, Up: Function Reference [Contents][Index]
Determine whether h is a zeromq socket object.
h - a potential zeromq socket object to check
tf - true if h is a zeromq socket object, otherwise false.
See also: zmq_socket.
Bind a zeromq socket to a endpoint.
sock - the socket to bind.
endpoint - the endpoint string.
status - status for bind. On success, bind will return a status of true
See also: zmq_socket .
Close a zeromq socket.
sock - the socket type to close.
None
See also: zmq_socket .
Connect a zeromq socket to a endpoint.
sock - the socket to connect.
endpoint - the endpoint string.
status - status for connect. On success, connect will return a status of true
See also: zmq_socket.
Generate a random private/public keypair
None
publickey is a string that is the encoded public key
privatekey is a string that is the encoded private key
See also: zmq_z85_encode .
Derive the public key from a private key
privatekey is a string that is the encoded private key. It must be 40 characters in length
publickey is a string that is the encoded public key
See also: zmq_curve_keypair.
Disconnect a zeromq socket from an endpoint.
sock - the socket to disconnect from.
endpoint - a previously connected endpoint string to disconnect.
status - status for disconnect. On success, disconnect will return a status of true
See also: zmq_socket, zmq_connect.
Get the value of errno from zeromq.
None
errornum is the errno value of the calling thread.
Get the current value of an option.
sock - the socket to connect.
optionid - the setsockopt option to set.
Valid optionids are:
ZMQ_RCVMORE
Flag for whether a message has been split into multiple messages. The return value will be either 0 or 1.
ZMQ_TYPE
Socket type for zeromq socket created with zmq_socket. Valid types are the same as the socket type value specified with zmq_socket.
ZMQ_EVENTS
Get the event state of zeromq socket. The returned value is a bit mask that may contain the following set values:
ZMQ_POLLIN
set when at least one message is available to read and zmq_recv will not block.
ZMQ_POLLOUT
set when at least one message can be written without zmq_send blocking.
ZMQ_IDENTITY
or ZMQ_ROUTING_ID
Get the socket identity value
ZMQ_RATE
Get the multicast data rate
ZMQ_PRIORITY
Get socket priority (linux only)
ZMQ_BACKLOG
Get length of queue for pending connections
ZMQ_LAST_ENDPOINT
Get the last endpoint the socket was connected to
ZMQ_CONNECT_TIMEOUT
Get the connect timeout value
ZMQ_SOCKS_PROXY
Get the SOCKS5 proxy value (string)
ZMQ_CURVE_SERVER
Get whether socket is a curve server (1) or not (0)
ZMQ_CURVE_PRIVATEKEY
Get a the curve socket private key (string)
ZMQ_CURVE_PUBLICKEY
Get a the curve socket public key (string)
ZMQ_CURVE_SERVERKEY
Get a the curve socket public key (string)
ZMQ_PLAIN_SERVER
Get whether socket server will use plain authentication (1) or not (0)
ZMQ_PLAIN_USERNAME
Get the plain socket username (string)
ZMQ_PLAIN_PASSWORD
Get the plain socket password (string)
ZMQ_GSSAPI_SERVER
Get whether socket server will use gssapi authentication (1) or not (0)
ZMQ_GSSAPI_PLAINTEXT
Get whether socket will encrypt gssapi authentication (1) or not (0)
ZMQ_GSSAPI_PRINCIPAL
Get the name of the gssapi principal (string)
ZMQ_GSSAPI_SERVICE_PRINCIPAL
Get the name of the gssapi service principal (string)
ZMQ_MECHANISM
Get the security mechanism (ZMQ_NULL, ZMQ_PLAIN, ZMQ_CURVE, ZMQ_GSSAPI)
value - the value set for the option, or [].
See also: zmq_socket, zmq_setsockopt.
Check if the zmq library supports a given feature.
feature is the name of feature to check.
Currently known features are:
library supports the ipc:// protocol
library supports the pgm:// protocol
library supports the tipc:// protocol
library supports the norm:// protocol
library supports the CURVE security mechanism
library supports the GSSAPI security mechanism
library was built with the draft API.
yesno - set to true if the feature is available, otherwise false.
Wait up to timeout time for received data on socket.
sock - the socket to wait on.
socklist - the array of sockets to wait on.
timeout - timeout time in milliseconds. A value of 0 will return without waiting. A value of -1 will wait until there is data.
havedata - value of 1 if have data.
indexlist - cell array of indexes to sockets that have data.
See also: zmq_socket.
Attempt to receive up to len bytes of data from zeromq socket.
sock - the socket to receive from.
len - number of bytes to read.
flags - optional flags to pass to recv
data - the read data in an uint8 array.
See also: zmq_socket.
Attempt to send to data bytes of data to zeromq socket.
sock - the socket to receive from.
data - data to send - either string or uint8 type.
flags - optional flags to pass to send
count - number of bytes written to socket, or -1 on error.
See also: zmq_socket.
Set a socket option on a zeromq socket.
sock - the socket to connect.
optionid - the setsockopt option to set.
value - the value to set.
Known valid optionids are:
ZMQ_SUBSCRIBE
Subscribe to incoming messages matching the value. The value is either a string or a uint8 array that must match the start of any incoming message
ZMQ_UNSUBSCRIBE
Unsubscribe from incoming messages
ZMQ_CONNECT_TIMEOUT
Set timeout for connect calls
ZMQ_IDENTITY
or ZMQ_ROUTING_ID
Set the identity of a socket (string or uint8 data)
ZMQ_RATE
Set the multicast data rate
ZMQ_PRIORITY
Set the socket priority (linux only)
ZMQ_BACKLOG
Set the queue length for incomming connections
ZMQ_SOCKS_PROXY
Set the socks5 proxy value (string)
ZMQ_CURVE_SERVER
Set whether socket is a curve server (1) or not (0)
ZMQ_CURVE_PRIVATEKEY
Set the curve socket private key (string)
ZMQ_CURVE_PUBLICKEY
Set the curve socket public key (string)
ZMQ_CURVE_SERVERKEY
Set the curve socket public key (string)
ZMQ_PLAIN_SERVER
Set whether socket server will use plain authentication (1) or not (0)
ZMQ_PLAIN_USERNAME
Set the plain socket username (string)
ZMQ_PLAIN_PASSWORD
Set the plain socket password (string)
ZMQ_GSSAPI_SERVER
Set whether socket server will use gssapi authentication (1) or not (0)
ZMQ_GSSAPI_PLAINTEXT
Set whether socket will encrypt gssapi authentication (1) or not (0)
ZMQ_GSSAPI_PRINCIPAL
Set the name of the gssapi principal (string)
ZMQ_GSSAPI_SERVICE_PRINCIPAL
Set the name of the gssapi service principal (string)
status - status for setsockopt. On success, setsockopt will return status of true
See also: zmq_getsockopt, ZMQ_SUBSCRIBE, ZMQ_UNSUBSCRIBE, ZMQ_CONNECT_TIMEOUT.
Create a zeromq socket.
type - the socket type to create.
Supported socket types are:
ZMQ_PUB
Publish socket
ZMQ_SUB
Subscribe socket
ZMQ_REQ
Request socket
ZMQ_REP
Reply socket
ZMQ_PULL
Pull socket
ZMQ_PUSH
Push socket
ZMQ_PAIR
Pair socket
ZMQ_DEALER
Dealer socket
ZMQ_ROUTER
Router socket
ZMQ_XPUB
Publish socket
ZMQ_XSUB
Subscribe socket
ZMQ_STREAM
Stream socket
sock - an instance of octave_zeromq_socket class.
See also: ZMQ_PUB, ZMQ_SUB, ZMQ_PUSH, ZMQ_PULL, ZMQ_REQ, ZMQ_REP, ZMQ_PAIR, ZMQ_DEALER, ZMQ_ROUTER, ZMQ_XPUB, ZMQ_XSUB, ZMQ_STREAM.
Get the last error from zeromq.
None
errorstr - a string representation of the last error
Unbind a previously bound zeromq socket from a endpoint.
sock - the socket to unbind.
endpoint - the endpoint string to unbind.
status - status for unbind. On success, unbind will return a status of true
See also: zmq_socket, zmq_bind .
Get the ZeroMQ library version.
None
major, minor patch - version of the ZeroMQ library.
Decode a z85 encoded string to a binary key.
instr - a string encoded data
data - uint8 decoded data
Encode a binary key as Z85 printable text.
data - uint8 data that must have a size divisible by 4.
dest - string encoded data
Next: ZeroMQ socket type constants, Up: Function Reference [Contents][Index]