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
09e7416e
Commit
09e7416e
authored
Oct 27, 2014
by
lysyloren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unbind socket with real endpoint when binding by wild-card * address
parent
d6c4750d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
zmq_ipc.txt
doc/zmq_ipc.txt
+7
-1
zmq_tcp.txt
doc/zmq_tcp.txt
+5
-0
socket_base.cpp
src/socket_base.cpp
+2
-2
No files found.
doc/zmq_ipc.txt
View file @
09e7416e
...
...
@@ -35,7 +35,7 @@ operating system namespace used by the 'ipc' implementation, and must fulfill
any restrictions placed by the operating system on the format and length of a
'pathname'.
When the address is `*`, _zmq_bind()_ shall generate a unique temporary
When the address is
wild-card
`*`, _zmq_bind()_ shall generate a unique temporary
pathname. The caller should retrieve this pathname using the ZMQ_LAST_ENDPOINT
socket option. See linkzmq:zmq_getsockopt[3] for details.
...
...
@@ -57,6 +57,12 @@ NOTE: IPC pathnames have a maximum size that depends on the operating system.
On Linux, the maximum is 113 characters including the "ipc://" prefix (107
characters for the real path name).
Unbinding wild-card address from a socket
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When wild-card `*` 'endpoint' was used in _zmq_bind()_, the caller should use
real 'endpoind' obtained from the ZMQ_LAST_ENDPOINT socket option to unbind
this 'endpoint' from a socket using _zmq_unbind()_.
Connecting a socket
~~~~~~~~~~~~~~~~~~~
When connecting a 'socket' to a peer address using _zmq_connect()_ with the
...
...
doc/zmq_tcp.txt
View file @
09e7416e
...
...
@@ -46,6 +46,11 @@ When using ephemeral ports, the caller should retrieve the actual assigned
port using the ZMQ_LAST_ENDPOINT socket option. See linkzmq:zmq_getsockopt[3]
for details.
Unbinding wild-card addres from a socket
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When wild-card `*` 'endpoint' was used in _zmq_bind()_, the caller should use
real 'endpoind' obtained from the ZMQ_LAST_ENDPOINT socket option to unbind
this 'endpoint' from a socket using _zmq_unbind()_.
Connecting a socket
~~~~~~~~~~~~~~~~~~~
...
...
src/socket_base.cpp
View file @
09e7416e
...
...
@@ -401,7 +401,7 @@ int zmq::socket_base_t::bind (const char *addr_)
// Save last endpoint URI
listener
->
get_address
(
last_endpoint
);
add_endpoint
(
addr_
,
(
own_t
*
)
listener
,
NULL
);
add_endpoint
(
last_endpoint
.
c_str
()
,
(
own_t
*
)
listener
,
NULL
);
return
0
;
}
...
...
@@ -420,7 +420,7 @@ int zmq::socket_base_t::bind (const char *addr_)
// Save last endpoint URI
listener
->
get_address
(
last_endpoint
);
add_endpoint
(
addr_
,
(
own_t
*
)
listener
,
NULL
);
add_endpoint
(
last_endpoint
.
c_str
()
,
(
own_t
*
)
listener
,
NULL
);
return
0
;
}
#endif
...
...
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