• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

draft/H25-Mar-2021-

examples/H25-Mar-2021-

examples_security/H25-Mar-2021-

README.mdH A D25-Mar-20213.2 KiB

auth.goH A D25-Mar-202116.3 KiB

auth_test.goH A D25-Mar-20213.5 KiB

ctxoptions_unix.goH A D25-Mar-20211.4 KiB

ctxoptions_windows.goH A D25-Mar-20211.2 KiB

doc.goH A D25-Mar-20211.6 KiB

dummy.cH A D25-Mar-202153

errors.goH A D25-Mar-20212.2 KiB

go.modH A D25-Mar-202138

polling.goH A D25-Mar-20214.6 KiB

reactor.goH A D25-Mar-20214.8 KiB

socketevent_test.goH A D25-Mar-20211.6 KiB

socketget.goH A D25-Mar-202119 KiB

socketget_unix.goH A D25-Mar-2021262

socketget_windows.goH A D25-Mar-2021710

socketset.goH A D25-Mar-202122.7 KiB

utils.goH A D25-Mar-20213.8 KiB

wrappers_unix.goH A D25-Mar-20212.9 KiB

wrappers_windows.goH A D25-Mar-20214.2 KiB

zmq4.goH A D25-Mar-202133 KiB

zmq4.hH A D25-Mar-20214.3 KiB

zmq41_test.goH A D25-Mar-20211.4 KiB

zmq4_test.goH A D25-Mar-202142.5 KiB

README.md

1A Go interface to [ZeroMQ](http://www.zeromq.org/) version 4.
2
3
4----------------------------------------------------------------
5
6## Warning
7
8Starting with Go 1.14, on Unix-like systems, you will get a lot of
9interrupted signal calls. See the top of a package documentation
10for a fix.
11
12----------------------------------------------------------------
13
14
15[![Go Report Card](https://goreportcard.com/badge/github.com/pebbe/zmq4)](https://goreportcard.com/report/github.com/pebbe/zmq4)
16[![GoDoc](https://godoc.org/github.com/pebbe/zmq4?status.svg)](https://godoc.org/github.com/pebbe/zmq4)
17
18This requires ZeroMQ version 4.0.1 or above. To use CURVE security in
19versions prior to 4.2, ZeroMQ must be installed with
20[libsodium](https://github.com/jedisct1/libsodium) enabled.
21
22Partial support for ZeroMQ 4.2 DRAFT is available in the alternate
23version of zmq4 `draft`. The API pertaining to this is subject to
24change. To use this:
25
26    import (
27        zmq "github.com/pebbe/zmq4/draft"
28    )
29
30For ZeroMQ version 3, see: http://github.com/pebbe/zmq3
31
32For ZeroMQ version 2, see: http://github.com/pebbe/zmq2
33
34Including all examples of [ØMQ - The Guide](http://zguide.zeromq.org/page:all).
35
36Keywords: zmq, zeromq, 0mq, networks, distributed computing, message passing, fanout, pubsub, pipeline, request-reply
37
38### See also
39
40 * [go-zeromq/zmq4](https://github.com/go-zeromq/zmq4) — A pure-Go implementation of ØMQ (ZeroMQ), version 4
41 * [go-nanomsg](https://github.com/op/go-nanomsg) — Language bindings for nanomsg in Go
42 * [goczmq](https://github.com/zeromq/goczmq) — A Go interface to CZMQ
43 * [Mangos](https://github.com/go-mangos/mangos) — An implementation in pure Go of the SP ("Scalable Protocols") protocols
44
45## Requirements
46
47zmq4 is just a wrapper for the ZeroMQ library. It doesn't include the
48library itself. So you need to have ZeroMQ installed, including its
49development files. On Linux and Darwin you can check this with (`$` is
50the command prompt):
51
52```
53$ pkg-config --modversion libzmq
544.3.1
55```
56
57The Go compiler must be able to compile C code. You can check this
58with:
59```
60$ go env CGO_ENABLED
611
62```
63
64You can't do cross-compilation. That would disable C.
65
66## Install
67
68    go get github.com/pebbe/zmq4
69
70## Docs
71
72 * [package help](http://godoc.org/github.com/pebbe/zmq4)
73 * [wiki](https://github.com/pebbe/zmq4/wiki)
74
75## API change
76
77There has been an API change in commit
780bc5ab465849847b0556295d9a2023295c4d169e of 2014-06-27, 10:17:55 UTC
79in the functions `AuthAllow` and `AuthDeny`.
80
81Old:
82
83    func AuthAllow(addresses ...string)
84    func AuthDeny(addresses ...string)
85
86New:
87
88    func AuthAllow(domain string, addresses ...string)
89    func AuthDeny(domain string, addresses ...string)
90
91If `domain` can be parsed as an IP address, it will be interpreted as
92such, and it and all remaining addresses are added to all domains.
93
94So this should still work as before:
95
96    zmq.AuthAllow("127.0.0.1", "123.123.123.123")
97
98But this won't compile:
99
100    a := []string{"127.0.0.1", "123.123.123.123"}
101    zmq.AuthAllow(a...)
102
103And needs to be rewritten as:
104
105    a := []string{"127.0.0.1", "123.123.123.123"}
106    zmq.AuthAllow("*", a...)
107
108Furthermore, an address can now be a single IP address, as well as an IP
109address and mask in CIDR notation, e.g. "123.123.123.0/24".
110