ZSocket class

ZeroMQ sockets present an abstraction of an asynchronous message queue, with the exact queuing semantics depending on the socket type in use. Where conventional sockets transfer streams of bytes or discrete datagrams, ZeroMQ sockets transfer discrete messages.

ZeroMQ sockets being asynchronous means that the timings of the physical connection setup and tear down, reconnect and effective delivery are transparent to the user and organized by ZeroMQ itself. Further, messages may be queued in the event that a peer is unavailable to receive them.

Inheritance
Implementers

Constructors

ZSocket(ZMQSocket _socket, ZContext _context)
Construct a new ZSocket with a given underlying ZMQSocket _socket and the global ZContext _context

Properties

frames Stream<ZFrame>
Stream of received ZFrames (expanded messages stream)
no setter
hashCode int
The hash code for this object.
no setterinherited
messages Stream<ZMessage>
Stream of received ZMessages
no setter
payloads Stream<Uint8List>
Stream of received payloads (expanded frames strem)
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

bind(String address) → void
Creates an endpoint for accepting connections and binds to it.
inherited
close() → void
Closes the socket and releases underlying resources. Note after closing a socket it can't be reopened/reconncted again
override
connect(String address) → void
Connects the socket to an endpoint and then accepts incoming connections on that endpoint.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(List<int> data, {int flags = 0}) → void
Sends the given data payload over this socket.
inherited
sendFrame(ZFrame frame, {int flags = 0}) → void
Sends the given frame over this socket
inherited
sendMessage(ZMessage message, {int flags = 0}) → void
Sends the given multi-part message over this socket
inherited
sendString(String string, {int flags = 0}) → void
Sends the given string over this socket
inherited
setCurvePublicKey(String key) → void
Sets the socket's long term public key. You must set this on CURVE client sockets, see zmq_curve(7). You can provide the key as a 40-character string encoded in the Z85 encoding format. The public key must always be used with the matching secret key.
inherited
setCurveSecretKey(String key) → void
Sets the socket's long term secret key. You must set this on both CURVE client and server sockets, see zmq_curve(7). You can provide the key as a 40-character string encoded in the Z85 encoding format.
inherited
setCurveServerKey(String key) → void
Sets the socket's long term server key. You must set this on CURVE client sockets, see zmq_curve(7). You can provide the key as a 40-character string encoded in the Z85 encoding format. This key must have been generated together with the server's secret key.
inherited
setOption(int option, String value) → void
Set a socket option to a specific value
inherited
subscribe(String topic) → void
The ZMQ_SUBSCRIBE option shall establish a new message filter on a ZMQ_SUB socket. Newly created ZMQ_SUB sockets shall filter out all incoming messages, therefore you should call this option to establish an initial message filter.
inherited
toString() String
A string representation of this object.
inherited
unsubscribe(String topic) → void
The ZMQ_UNSUBSCRIBE option shall remove an existing message filter on a ZMQ_SUB socket. The filter specified must match an existing filter previously established with the ZMQ_SUBSCRIBE option. If the socket has several instances of the same filter attached the ZMQ_UNSUBSCRIBE option shall remove only one instance, leaving the rest in place and functional.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited