1NANOCAT(1)                       nanomsg 1.1.5                      NANOCAT(1)
2
3
4

NAME

6       nanocat - a command-line interface to nanomsg
7

SYNOPSIS

9           nanocat --req {--connect ADDR|--bind ADDR} {--data DATA|--file PATH} [-i SEC] [-AQ]
10           nanocat --rep {--connect ADDR|--bind ADDR} {--data DATA|--file PATH} [-AQ]
11           nanocat --push {--connect ADDR|--bind ADDR} {--data DATA|--file PATH} [-i SEC]
12           nanocat --pull {--connect ADDR|--bind ADDR} [-AQ]
13           nanocat --pub {--connect ADDR|--bind ADDR} {--data DATA|--file PATH} [-i SEC]
14           nanocat --sub {--connect ADDR|--bind ADDR} [--subscribe PREFIX ...] [-AQ]
15           nanocat --surveyor {--connect ADDR|--bind ADDR} {--data DATA|--file PATH} [-i SEC] [-AQ]
16           nanocat --respondent {--connect ADDR|--bind ADDR} {--data DATA|--file PATH} [-AQ]
17           nanocat --bus {--connect ADDR|--bind ADDR} {--data DATA|--file PATH} [-i SEC] [-AQ]
18           nanocat --pair {--connect ADDR|--bind ADDR} {--data DATA|--file PATH} [-i SEC] [-AQ]
19
20       In the case symlinks are installed:
21
22           nn_req {--connect ADDR|--bind ADDR} {--data DATA|--file PATH} [-i SEC] [-AQ]
23           nn_rep {--connect ADDR|--bind ADDR} {--data DATA|--file PATH} [-AQ]
24           nn_push {--connect ADDR|--bind ADDR} {--data DATA|--file PATH} [-i SEC]
25           nn_pull {--connect ADDR|--bind ADDR} [-AQ]
26           nn_pub {--connect ADDR|--bind ADDR} {--data DATA|--file PATH} [-i SEC]
27           nn_sub {--connect ADDR|--bind ADDR} [--subscribe PREFIX ...] [-AQ]
28           nn_surveyor {--connect ADDR|--bind ADDR} {--data DATA|--file PATH} [-i SEC] [-AQ]
29           nn_respondent {--connect ADDR|--bind ADDR} {--data DATA|--file PATH} [-AQ]
30           nn_bus {--connect ADDR|--bind ADDR} {--data DATA|--file PATH} [-i SEC] [-AQ]
31           nn_pair {--connect ADDR|--bind ADDR} {--data DATA|--file PATH} [-i SEC] [-AQ]
32

DESCRIPTION

34       The nanocat is a command-line tool to send and receive data via nanomsg
35       sockets. It can be used for debugging purposes, sending files through
36       the network, health checking the system or whatever else you can think
37       of.
38

OPTIONS

40       Generic:
41
42       --verbose,-v
43           Increase verbosity of the nanocat
44
45       --silent,-q
46           Decrease verbosity of the nanocat
47
48       --help,-h
49           This help text
50
51       Socket Types:
52
53       --push
54           Use NN_PUSH socket type
55
56       --pull
57           Use NN_PULL socket type
58
59       --pub
60           Use NN_PUB socket type
61
62       --sub
63           Use NN_SUB socket type
64
65       --req
66           Use NN_REQ socket type
67
68       --rep
69           Use NN_REP socket type
70
71       --surveyor
72           Use NN_SURVEYOR socket type
73
74       --respondent
75           Use NN_RESPONDENT socket type
76
77       --bus
78           Use NN_BUS socket type
79
80       --pair
81           Use NN_PAIR socket type
82
83       Socket Options:
84
85       --bind ADDR
86           Bind socket to the address ADDR
87
88       --connect ADDR
89           Connect socket to the address ADDR
90
91       --bind-ipc,-X PATH
92           Bind socket to the ipc address "ipc://PATH".
93
94       --connect-ipc,-x PATH
95           Connect socket to the ipc address "ipc://PATH".
96
97       --bind-local,-L PORT
98           Bind socket to the tcp address "tcp://127.0.0.1:PORT".
99
100       --connect-local,-l PORT
101           Connect socket to the tcp address "tcp://127.0.0.1:PORT".
102
103       --recv-timeout SEC
104           Set timeout for receiving a message
105
106       --send-timeout SEC
107           Set timeout for sending a message
108
109       SUB Socket Options:
110
111       --subscribe PREFIX
112           Subscribe to the prefix PREFIX. Note: socket will be subscribed to
113           everything (empty prefix) if no prefixes are specified on the
114           command-line.
115
116       Input Options:
117
118       --format FORMAT
119           Use echo format FORMAT (same as the options below)
120
121       --raw
122           Dump message as is (Note: no delimiters are printed)
123
124       --ascii,-A
125           Print ASCII part of message delimited by newline. All non-ascii
126           characters replaced by dot.
127
128       --quoted,-Q
129           Print each message on separate line in double quotes with C-like
130           character escaping
131
132       --msgpack
133           Print each message as msgpacked string (raw type). This is useful
134           for programmatic parsing.
135
136       Output Options:
137
138       --interval,-i SEC
139           Send message (or request) every SEC seconds
140
141       --delay,-d SEC
142           Wait for SEC seconds before sending message (useful for one-shot
143           PUB sockets)
144
145       --data,-D DATA
146           Send DATA to the socket and quit for PUB, PUSH, PAIR, BUS socket.
147           Use DATA to reply for REP or  RESPONDENT socket. Send DATA as
148           request for REQ or SURVEYOR socket.
149
150       --file,-F PATH
151           Same as --data but get data from file PATH
152

EXAMPLES

154       The ping-pong with nn_req/nn_rep sockets (must be run simultaneously):
155
156           nanocat --rep --bind tcp://127.0.0.1:1234 --data pong --format ascii
157           nanocat --req --connect tcp://127.0.0.1:1234 --data ping --format ascii
158
159       Or in shorter to write form:
160
161           nn_rep -L1234 -Dpong -A
162           nn_req -l1234 -Dping -A
163
164       Do periodic requests once a second:
165
166           nn_req -l1234 -Dping -A -i 1
167
168       The rep socket that never reply (no -D option), may be used to check if
169       resending the requests is actually work:
170
171           nanocat --rep --connect ipc:///var/run/app/req.socket
172
173       Send an output of the ls to whatever would connect to 127.0.0.1:1234
174       then exit:
175
176           ls | nanocat --push -L1234 -F-
177
178       Send heartbeats to imaginary monitoring service:
179
180           nanocat --pub --connect tpc://monitoring.example.org -D"I am alive!" --interval 10
181

SEE ALSO

183       nanomsg(7)
184

AUTHORS

186       Paul Colomiets <paul@colomiets.name>
187
188
189
190                                  2022-07-22                        NANOCAT(1)
Impressum