Documentation
¶
Overview ¶
Package zmqmod is the native module "zmq": ZeroMQ sockets, to talk with other programs (in any language) and other machines. It uses the pure Go implementation github.com/go-zeromq/zmq4, so no C library is needed.
use zmq;
local s = new zmq::Socket("REQ");
s->connect("tcp://localhost:5555");
s->send("hello");
println(s->receive(5)); // the reply, or nil after 5 seconds
s->close();
Messages are strings (bytes); a message of several parts is a vector of strings. Sockets of type REQ/REP, PUB/SUB, PUSH/PULL, DEALER/ROUTER and PAIR are supported; zmq::poll waits for the first of several sockets.
Index ¶
Constants ¶
View Source
const NetError = "NetError"
NetError is the kind of the exceptions for network problems: an address that cannot be bound or reached, a message that cannot be sent or received.
Variables ¶
View Source
var Socket = &native.Class{Name: "Socket"}
Socket is the class zmq::Socket.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.