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
dc2ab432
Commit
dc2ab432
authored
Dec 15, 2013
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #789 from trevorbernard/single-connect
Single connect
parents
02a8d1ea
754ae1b1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
AUTHORS
AUTHORS
+1
-0
socket_base.cpp
src/socket_base.cpp
+12
-0
No files found.
AUTHORS
View file @
dc2ab432
...
...
@@ -93,6 +93,7 @@ Terry Wilson <terry@logivox.net>
Thijs Terlouw <thijsterlouw@gmail.com>
Toralf Wittner <toralf.wittner@gmail.com>
Tore Halvorsen <tore.halvorsen@gmail.com>
Trevor Bernard <trevor.bernard@gmail.com>
Vitaly Mayatskikh <v.mayatskih@gmail.com>
Lourens Naudé <lourens@methodmissing.com>
Hardeep Singh <hshardeesi@gmail.com>
...
...
src/socket_base.cpp
View file @
dc2ab432
...
...
@@ -546,6 +546,18 @@ int zmq::socket_base_t::connect (const char *addr_)
return
0
;
}
bool
is_single_connect
=
(
options
.
type
==
ZMQ_DEALER
||
options
.
type
==
ZMQ_SUB
||
options
.
type
==
ZMQ_REQ
);
if
(
unlikely
(
is_single_connect
))
{
endpoints_t
::
iterator
it
=
endpoints
.
find
(
addr_
);
if
(
it
!=
endpoints
.
end
())
{
// There is no valid use for multiple connects for SUB-PUB nor
// DEALER-ROUTER nor REQ-REP. Multiple connects produces
// nonsensical results.
return
0
;
}
}
// Choose the I/O thread to run the session in.
io_thread_t
*
io_thread
=
choose_io_thread
(
options
.
affinity
);
...
...
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