zmqmod

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 9 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL