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_RCVMOREFlag for whether a message has been split into multiple messages. The return value will be either 0 or 1.
ZMQ_TYPESocket type for zeromq socket created with zmq_socket. Valid types are the same as the socket type value specified with zmq_socket.
ZMQ_EVENTSGet 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_IDGet the socket identity value
ZMQ_RATEGet the multicast data rate
ZMQ_PRIORITYGet socket priority (linux only)
ZMQ_BACKLOGGet length of queue for pending connections
ZMQ_LAST_ENDPOINTGet the last endpoint the socket was connected to
ZMQ_CONNECT_TIMEOUTGet the connect timeout value
ZMQ_SOCKS_PROXYGet the SOCKS5 proxy value (string)
ZMQ_CURVE_SERVERGet whether socket is a curve server (1) or not (0)
ZMQ_CURVE_PRIVATEKEYGet a the curve socket private key (string)
ZMQ_CURVE_PUBLICKEYGet a the curve socket public key (string)
ZMQ_CURVE_SERVERKEYGet a the curve socket public key (string)
ZMQ_PLAIN_SERVERGet whether socket server will use plain authentication (1) or not (0)
ZMQ_PLAIN_USERNAMEGet the plain socket username (string)
ZMQ_PLAIN_PASSWORDGet the plain socket password (string)
ZMQ_GSSAPI_SERVERGet whether socket server will use gssapi authentication (1) or not (0)
ZMQ_GSSAPI_PLAINTEXTGet whether socket will encrypt gssapi authentication (1) or not (0)
ZMQ_GSSAPI_PRINCIPALGet the name of the gssapi principal (string)
ZMQ_GSSAPI_SERVICE_PRINCIPALGet the name of the gssapi service principal (string)
ZMQ_MECHANISMGet 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_SUBSCRIBESubscribe 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_UNSUBSCRIBEUnsubscribe from incoming messages
ZMQ_CONNECT_TIMEOUTSet timeout for connect calls
ZMQ_IDENTITY or ZMQ_ROUTING_IDSet the identity of a socket (string or uint8 data)
ZMQ_RATESet the multicast data rate
ZMQ_PRIORITYSet the socket priority (linux only)
ZMQ_BACKLOGSet the queue length for incomming connections
ZMQ_SOCKS_PROXYSet the socks5 proxy value (string)
ZMQ_CURVE_SERVERSet whether socket is a curve server (1) or not (0)
ZMQ_CURVE_PRIVATEKEYSet the curve socket private key (string)
ZMQ_CURVE_PUBLICKEYSet the curve socket public key (string)
ZMQ_CURVE_SERVERKEYSet the curve socket public key (string)
ZMQ_PLAIN_SERVERSet whether socket server will use plain authentication (1) or not (0)
ZMQ_PLAIN_USERNAMESet the plain socket username (string)
ZMQ_PLAIN_PASSWORDSet the plain socket password (string)
ZMQ_GSSAPI_SERVERSet whether socket server will use gssapi authentication (1) or not (0)
ZMQ_GSSAPI_PLAINTEXTSet whether socket will encrypt gssapi authentication (1) or not (0)
ZMQ_GSSAPI_PRINCIPALSet the name of the gssapi principal (string)
ZMQ_GSSAPI_SERVICE_PRINCIPALSet 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_PUBPublish socket
ZMQ_SUBSubscribe socket
ZMQ_REQRequest socket
ZMQ_REPReply socket
ZMQ_PULLPull socket
ZMQ_PUSHPush socket
ZMQ_PAIRPair socket
ZMQ_DEALERDealer socket
ZMQ_ROUTERRouter socket
ZMQ_XPUBPublish socket
ZMQ_XSUBSubscribe socket
ZMQ_STREAMStream 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]