Versions in this module Expand all Collapse all v1 v1.0.0 Apr 10, 2018 Changes in this version + const CLIENT + const CURVE + const CURVE_ALLOW_ANY + const DEALER + const DGRAM + const DISH + const DONTWAIT + const EADDRINUSE + const EADDRNOTAVAIL + const EAFNOSUPPORT + const ECONNABORTED + const ECONNREFUSED + const ECONNRESET + const EFSM + const EHOSTUNREACH + const EINPROGRESS + const EMSGSIZE + const EMTHREAD + const ENETDOWN + const ENETRESET + const ENETUNREACH + const ENOBUFS + const ENOCOMPATPROTO + const ENOTCONN + const ENOTSOCK + const ENOTSUP + const EPROTONOSUPPORT + const ETERM + const ETIMEDOUT + const EVENT_ACCEPTED + const EVENT_ACCEPT_FAILED + const EVENT_ALL + const EVENT_BIND_FAILED + const EVENT_CLOSED + const EVENT_CLOSE_FAILED + const EVENT_CONNECTED + const EVENT_CONNECT_DELAYED + const EVENT_CONNECT_RETRIED + const EVENT_DISCONNECTED + const EVENT_LISTENING + const EVENT_MONITOR_STOPPED + const GATHER + const GSSAPI + const IoThreadsDflt + const MaxSocketsDflt + const NULL + const PAIR + const PLAIN + const POLLIN + const POLLOUT + const PUB + const PULL + const PUSH + const RADIO + const REP + const REQ + const ROUTER + const SCATTER + const SERVER + const SNDMORE + const STREAM + const SUB + const XPUB + const XSUB + var ErrorContextClosed = errors.New("Context is closed") + var ErrorMoreExpected = errors.New("More expected") + var ErrorNoSocket = errors.New("No such socket") + var ErrorNotImplemented405 = errors.New("Not implemented, requires 0MQ version 4.0.5") + var ErrorNotImplemented41 = errors.New("Not implemented, requires 0MQ version 4.1") + var ErrorNotImplemented42 = errors.New("Not implemented, requires 0MQ version 4.2") + var ErrorNotImplemented42draft = errors.New("Not implemented, requires 0MQ version 4.2 with drafts enabled") + var ErrorNotImplementedWindows = errors.New("Not implemented on Windows") + var ErrorSocketClosed = errors.New("Socket is closed") + func AuthAllow(domain string, addresses ...string) + func AuthCurveAdd(domain string, pubkeys ...string) + func AuthCurvePublic(z85SecretKey string) (z85PublicKey string, err error) + func AuthCurveRemove(domain string, pubkeys ...string) + func AuthCurveRemoveAll(domain string) + func AuthDeny(domain string, addresses ...string) + func AuthMetaBlob(key, value string) (blob []byte, err error) + func AuthPlainAdd(domain, username, password string) + func AuthPlainRemove(domain string, usernames ...string) + func AuthPlainRemoveAll(domain string) + func AuthSetMetadataHandler(...) + func AuthSetVerbose(verbose bool) + func AuthStart() (err error) + func AuthStop() + func Error(e int) string + func GetBlocky() (bool, error) + func GetIoThreads() (int, error) + func GetIpv6() (bool, error) + func GetMaxMsgsz() (int, error) + func GetMaxSockets() (int, error) + func HasCurve() bool + func HasGssapi() bool + func HasIpc() bool + func HasNorm() bool + func HasPgm() bool + func HasTipc() bool + func NewCurveKeypair() (z85_public_key, z85_secret_key string, err error) + func Proxy(frontend, backend, capture *Socket) error + func ProxySteerable(frontend, backend, capture, control *Socket) error + func SetBlocky(i bool) error + func SetIoThreads(n int) error + func SetIpv6(i bool) error + func SetMaxMsgsz(n int) error + func SetMaxSockets(n int) error + func SetThreadPriority(n int) error + func SetThreadSchedPolicy(n int) error + func Term() error + func Version() (major, minor, patch int) + func Z85decode(s string) string + func Z85encode(data string) string + type Context struct + func NewContext() (ctx *Context, err error) + func (ctx *Context) GetBlocky() (bool, error) + func (ctx *Context) GetIoThreads() (int, error) + func (ctx *Context) GetIpv6() (bool, error) + func (ctx *Context) GetMaxMsgsz() (int, error) + func (ctx *Context) GetMaxSockets() (int, error) + func (ctx *Context) NewSocket(t Type) (soc *Socket, err error) + func (ctx *Context) SetBlocky(i bool) error + func (ctx *Context) SetIoThreads(n int) error + func (ctx *Context) SetIpv6(i bool) error + func (ctx *Context) SetMaxMsgsz(n int) error + func (ctx *Context) SetMaxSockets(n int) error + func (ctx *Context) SetThreadPriority(n int) error + func (ctx *Context) SetThreadSchedPolicy(n int) error + func (ctx *Context) Term() error + type Errno uintptr + func AsErrno(err error) Errno + func (errno Errno) Error() string + type Event int + func (e Event) String() string + type Flag int + func (f Flag) String() string + type Mechanism int + func (m Mechanism) String() string + type OptGroup string + type OptRoutingId uint32 + type Polled struct + Events State + Socket *Socket + type Poller struct + func NewPoller() *Poller + func (p *Poller) Add(soc *Socket, events State) int + func (p *Poller) Poll(timeout time.Duration) ([]Polled, error) + func (p *Poller) PollAll(timeout time.Duration) ([]Polled, error) + func (p *Poller) Remove(id int) error + func (p *Poller) RemoveBySocket(soc *Socket) error + func (p *Poller) String() string + func (p *Poller) Update(id int, events State) (previous State, err error) + func (p *Poller) UpdateBySocket(soc *Socket, events State) (previous State, err error) + type Reactor struct + func NewReactor() *Reactor + func (r *Reactor) AddChannel(ch <-chan interface{}, limit int, handler func(interface{}) error) (id uint64) + func (r *Reactor) AddChannelTime(ch <-chan time.Time, limit int, handler func(interface{}) error) (id uint64) + func (r *Reactor) AddSocket(soc *Socket, events State, handler func(State) error) + func (r *Reactor) RemoveChannel(id uint64) + func (r *Reactor) RemoveSocket(soc *Socket) + func (r *Reactor) Run(interval time.Duration) (err error) + func (r *Reactor) SetVerbose(verbose bool) + type Socket struct + func NewSocket(t Type) (soc *Socket, err error) + func (client *Socket) ClientAuthCurve(server_public_key, client_public_key, client_secret_key string) error + func (client *Socket) ClientAuthPlain(username, password string) error + func (server *Socket) ServerAuthCurve(domain, secret_key string) error + func (server *Socket) ServerAuthNull(domain string) error + func (server *Socket) ServerAuthPlain(domain string) error + func (soc *Socket) Bind(endpoint string) error + func (soc *Socket) Close() error + func (soc *Socket) Connect(endpoint string) error + func (soc *Socket) Context() (*Context, error) + func (soc *Socket) Disconnect(endpoint string) error + func (soc *Socket) GetAffinity() (uint64, error) + func (soc *Socket) GetBacklog() (int, error) + func (soc *Socket) GetConnectTimeout() (time.Duration, error) + func (soc *Socket) GetCurvePublickeyRaw() (string, error) + func (soc *Socket) GetCurvePublickeykeyZ85() (string, error) + func (soc *Socket) GetCurveSecretkeyRaw() (string, error) + func (soc *Socket) GetCurveSecretkeyZ85() (string, error) + func (soc *Socket) GetCurveServerkeyRaw() (string, error) + func (soc *Socket) GetCurveServerkeyZ85() (string, error) + func (soc *Socket) GetEvents() (State, error) + func (soc *Socket) GetFd() (int, error) + func (soc *Socket) GetFd() (uintptr, error) + func (soc *Socket) GetGssapiPlaintext() (bool, error) + func (soc *Socket) GetGssapiPrincipal() (string, error) + func (soc *Socket) GetGssapiServer() (bool, error) + func (soc *Socket) GetGssapiServicePrincipal() (string, error) + func (soc *Socket) GetHandshakeIvl() (time.Duration, error) + func (soc *Socket) GetIdentity() (string, error) + func (soc *Socket) GetImmediate() (bool, error) + func (soc *Socket) GetInvertMatching() (int, error) + func (soc *Socket) GetIpv6() (bool, error) + func (soc *Socket) GetLastEndpoint() (string, error) + func (soc *Socket) GetLinger() (time.Duration, error) + func (soc *Socket) GetMaxmsgsize() (int64, error) + func (soc *Socket) GetMechanism() (Mechanism, error) + func (soc *Socket) GetMulticastHops() (int, error) + func (soc *Socket) GetMulticastMaxtpdu() (int, error) + func (soc *Socket) GetPlainPassword() (string, error) + func (soc *Socket) GetPlainServer() (int, error) + func (soc *Socket) GetPlainUsername() (string, error) + func (soc *Socket) GetRate() (int, error) + func (soc *Socket) GetRcvbuf() (int, error) + func (soc *Socket) GetRcvhwm() (int, error) + func (soc *Socket) GetRcvmore() (bool, error) + func (soc *Socket) GetRcvtimeo() (time.Duration, error) + func (soc *Socket) GetReconnectIvl() (time.Duration, error) + func (soc *Socket) GetReconnectIvlMax() (time.Duration, error) + func (soc *Socket) GetRecoveryIvl() (time.Duration, error) + func (soc *Socket) GetSndbuf() (int, error) + func (soc *Socket) GetSndhwm() (int, error) + func (soc *Socket) GetSndtimeo() (time.Duration, error) + func (soc *Socket) GetSocksProxy() (string, error) + func (soc *Socket) GetTcpKeepalive() (int, error) + func (soc *Socket) GetTcpKeepaliveCnt() (int, error) + func (soc *Socket) GetTcpKeepaliveIdle() (int, error) + func (soc *Socket) GetTcpKeepaliveIntvl() (int, error) + func (soc *Socket) GetTcpMaxrt() (time.Duration, error) + func (soc *Socket) GetThreadSafe() (bool, error) + func (soc *Socket) GetTos() (int, error) + func (soc *Socket) GetType() (Type, error) + func (soc *Socket) GetVmciBufferMaxSize() (uint64, error) + func (soc *Socket) GetVmciBufferMinSize() (uint64, error) + func (soc *Socket) GetVmciBufferSize() (uint64, error) + func (soc *Socket) GetVmciConnectTimeout() (time.Duration, error) + func (soc *Socket) GetZapDomain() (string, error) + func (soc *Socket) Getusefd() (int, error) + func (soc *Socket) Join(group string) error + func (soc *Socket) Leave(group string) error + func (soc *Socket) Monitor(addr string, events Event) error + func (soc *Socket) Recv(flags Flag) (string, error) + func (soc *Socket) RecvBytes(flags Flag) ([]byte, error) + func (soc *Socket) RecvBytesWithMetadata(flags Flag, properties ...string) (msg []byte, metadata map[string]string, err error) + func (soc *Socket) RecvBytesWithOpts(flags Flag, options ...interface{}) ([]byte, []interface{}, error) + func (soc *Socket) RecvEvent(flags Flag) (event_type Event, addr string, value int, err error) + func (soc *Socket) RecvMessage(flags Flag) (msg []string, err error) + func (soc *Socket) RecvMessageBytes(flags Flag) (msg [][]byte, err error) + func (soc *Socket) RecvMessageBytesWithMetadata(flags Flag, properties ...string) (msg [][]byte, metadata map[string]string, err error) + func (soc *Socket) RecvMessageWithMetadata(flags Flag, properties ...string) (msg []string, metadata map[string]string, err error) + func (soc *Socket) RecvWithMetadata(flags Flag, properties ...string) (msg string, metadata map[string]string, err error) + func (soc *Socket) RecvWithOpts(flags Flag, options ...interface{}) (string, []interface{}, error) + func (soc *Socket) Send(data string, flags Flag, options ...interface{}) (int, error) + func (soc *Socket) SendBytes(data []byte, flags Flag, options ...interface{}) (int, error) + func (soc *Socket) SendMessage(parts ...interface{}) (total int, err error) + func (soc *Socket) SendMessageDontwait(parts ...interface{}) (total int, err error) + func (soc *Socket) SetAffinity(value uint64) error + func (soc *Socket) SetBacklog(value int) error + func (soc *Socket) SetConflate(value bool) error + func (soc *Socket) SetConnectRid(value string) error + func (soc *Socket) SetConnectTimeout(value time.Duration) error + func (soc *Socket) SetCurvePublickey(key string) error + func (soc *Socket) SetCurveSecretkey(key string) error + func (soc *Socket) SetCurveServer(value int) error + func (soc *Socket) SetCurveServerkey(key string) error + func (soc *Socket) SetGssapiPlaintext(value bool) error + func (soc *Socket) SetGssapiPrincipal(value string) error + func (soc *Socket) SetGssapiServer(value bool) error + func (soc *Socket) SetGssapiServicePrincipal(value string) error + func (soc *Socket) SetHandshakeIvl(value time.Duration) error + func (soc *Socket) SetHeartbeatIvl(value time.Duration) error + func (soc *Socket) SetHeartbeatTimeout(value time.Duration) error + func (soc *Socket) SetHeartbeatTtl(value time.Duration) error + func (soc *Socket) SetIdentity(value string) error + func (soc *Socket) SetImmediate(value bool) error + func (soc *Socket) SetInvertMatching(value int) error + func (soc *Socket) SetIpv6(value bool) error + func (soc *Socket) SetLinger(value time.Duration) error + func (soc *Socket) SetMaxmsgsize(value int64) error + func (soc *Socket) SetMulticastHops(value int) error + func (soc *Socket) SetMulticastMaxtpdu(value int) error + func (soc *Socket) SetPlainPassword(password string) error + func (soc *Socket) SetPlainServer(value int) error + func (soc *Socket) SetPlainUsername(username string) error + func (soc *Socket) SetProbeRouter(value int) error + func (soc *Socket) SetRate(value int) error + func (soc *Socket) SetRcvbuf(value int) error + func (soc *Socket) SetRcvhwm(value int) error + func (soc *Socket) SetRcvtimeo(value time.Duration) error + func (soc *Socket) SetReconnectIvl(value time.Duration) error + func (soc *Socket) SetReconnectIvlMax(value time.Duration) error + func (soc *Socket) SetRecoveryIvl(value time.Duration) error + func (soc *Socket) SetReqCorrelate(value int) error + func (soc *Socket) SetReqRelaxed(value int) error + func (soc *Socket) SetRouterHandover(value bool) error + func (soc *Socket) SetRouterMandatory(value int) error + func (soc *Socket) SetRouterRaw(value int) error + func (soc *Socket) SetSndbuf(value int) error + func (soc *Socket) SetSndhwm(value int) error + func (soc *Socket) SetSndtimeo(value time.Duration) error + func (soc *Socket) SetSocksProxy(value string) error + func (soc *Socket) SetStreamNotify(value int) error + func (soc *Socket) SetSubscribe(filter string) error + func (soc *Socket) SetTcpAcceptFilter(filter string) error + func (soc *Socket) SetTcpKeepalive(value int) error + func (soc *Socket) SetTcpKeepaliveCnt(value int) error + func (soc *Socket) SetTcpKeepaliveIdle(value int) error + func (soc *Socket) SetTcpKeepaliveIntvl(value int) error + func (soc *Socket) SetTcpMaxrt(value time.Duration) error + func (soc *Socket) SetTos(value int) error + func (soc *Socket) SetUnsubscribe(filter string) error + func (soc *Socket) SetUseFd(value int) error + func (soc *Socket) SetVmciBufferMaxSize(value uint64) error + func (soc *Socket) SetVmciBufferMinSize(value uint64) error + func (soc *Socket) SetVmciBufferSize(value uint64) error + func (soc *Socket) SetVmciConnectTimeout(value time.Duration) error + func (soc *Socket) SetXpubManual(value int) error + func (soc *Socket) SetXpubNodrop(value bool) error + func (soc *Socket) SetXpubVerbose(value int) error + func (soc *Socket) SetXpubVerboser(value int) error + func (soc *Socket) SetXpubWelcomeMsg(value string) error + func (soc *Socket) SetZapDomain(domain string) error + func (soc *Socket) Unbind(endpoint string) error + func (soc Socket) String() string + type State int + func (s State) String() string + type Type int + func (t Type) String() string