Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
4b635c3d
Commit
4b635c3d
authored
May 10, 2018
by
Lionel Flandrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: documentation for zmq_udp is outdated
Solution: update to document new binding options and IPv6 support
parent
99412c81
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
zmq_udp.txt
doc/zmq_udp.txt
+22
-5
No files found.
doc/zmq_udp.txt
View file @
4b635c3d
...
...
@@ -37,11 +37,12 @@ colon and the UDP port number to use.
An 'interface' may be specified by either of the following:
* The wild-card `*`, meaning all available interfaces.
* The
primary IPv4 address assigned to the interface, in its numeric
representation.
* The
name of the network interface (i.e. eth0, lo, wlan0 etc...)
* The primary address assigned to the interface, in its numeric
representation.
* Multicast address in its numeric representation the socket should join.
The UDP port number may be specified a numeric value, usually above 1024 on POSIX systems.
The UDP port number may be specified a numeric value, usually above
1024 on POSIX systems.
Connecting a socket
~~~~~~~~~~~~~~~~~~~
...
...
@@ -52,7 +53,8 @@ a colon and the UDP port number to use.
A 'peer address' may be specified by either of the following:
* The IPv4 or IPv6 address of the peer, in its numeric representation.
* The IPv4 or IPv6 address of the peer, in its numeric representation
or using its hostname.
* Multicast address in its numeric representation.
EXAMPLES
...
...
@@ -65,9 +67,18 @@ assert (rc == 0);
// Unicast - UDP port 5555 on the local loop-back interface
rc = zmq_bind(dish, "udp://127.0.0.1:5555");
assert (rc == 0);
// Unicast - UDP port 5555 on interface eth1
rc = zmq_bind(dish, "udp://eth1:5555");
assert (rc == 0);
// Multicast - UDP port 5555 on a Multicast address
rc = zmq_bind(dish, "udp://239.0.0.1:5555");
assert (rc == 0);
// Same as above but joining only on interface eth0
rc = zmq_bind(dish, "udp://eth0;239.0.0.1:5555");
assert (rc == 0);
// Same as above using IPv6 multicast
rc = zmq_bind(dish, "udp://eth0;[ff02::1]:5555");
assert (rc == 0);
----
...
...
@@ -76,9 +87,15 @@ assert (rc == 0);
// Connecting using an Unicast IP address
rc = zmq_connect(radio, "udp://192.168.1.1:5555");
assert (rc == 0);
// Connecting using a Multicast address
"
// Connecting using a Multicast address
rc = zmq_connect(socket, "udp://239.0.0.1:5555);
assert (rc == 0);
// Connecting using a Multicast address using local interface wlan0
rc = zmq_connect(socket, "udp://wlan0;239.0.0.1:5555);
assert (rc == 0);
// Connecting to IPv6 multicast
rc = zmq_connect(socket, "udp://[ff02::1]:5555);
assert (rc == 0);
----
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment