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
8ef7fbb4
Commit
8ef7fbb4
authored
Aug 31, 2013
by
Ian Barber
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #638 from shawnjgoff/master
Change name of icanhasall to subscribe_to_all
parents
82a00e3a
6a18f595
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
39 additions
and
39 deletions
+39
-39
dealer.cpp
src/dealer.cpp
+3
-3
dealer.hpp
src/dealer.hpp
+1
-1
pair.cpp
src/pair.cpp
+3
-3
pair.hpp
src/pair.hpp
+1
-1
pull.cpp
src/pull.cpp
+3
-3
pull.hpp
src/pull.hpp
+1
-1
push.cpp
src/push.cpp
+3
-3
push.hpp
src/push.hpp
+1
-1
router.cpp
src/router.cpp
+3
-3
router.hpp
src/router.hpp
+1
-1
socket_base.cpp
src/socket_base.cpp
+5
-5
socket_base.hpp
src/socket_base.hpp
+2
-2
stream.cpp
src/stream.cpp
+3
-3
stream.hpp
src/stream.hpp
+1
-1
xpub.cpp
src/xpub.cpp
+3
-3
xpub.hpp
src/xpub.hpp
+1
-1
xsub.cpp
src/xsub.cpp
+3
-3
xsub.hpp
src/xsub.hpp
+1
-1
No files found.
src/dealer.cpp
View file @
8ef7fbb4
...
...
@@ -32,10 +32,10 @@ zmq::dealer_t::~dealer_t ()
{
}
void
zmq
::
dealer_t
::
xattach_pipe
(
pipe_t
*
pipe_
,
bool
icanhas
all_
)
void
zmq
::
dealer_t
::
xattach_pipe
(
pipe_t
*
pipe_
,
bool
subscribe_to_
all_
)
{
//
icanhas
all_ is unused
(
void
)
icanhas
all_
;
//
subscribe_to_
all_ is unused
(
void
)
subscribe_to_
all_
;
zmq_assert
(
pipe_
);
...
...
src/dealer.hpp
View file @
8ef7fbb4
...
...
@@ -45,7 +45,7 @@ namespace zmq
protected
:
// Overloads of functions from socket_base_t.
void
xattach_pipe
(
zmq
::
pipe_t
*
pipe_
,
bool
icanhas
all_
);
void
xattach_pipe
(
zmq
::
pipe_t
*
pipe_
,
bool
subscribe_to_
all_
);
int
xsetsockopt
(
int
option_
,
const
void
*
optval_
,
size_t
optvallen_
);
int
xsend
(
zmq
::
msg_t
*
msg_
);
int
xrecv
(
zmq
::
msg_t
*
msg_
);
...
...
src/pair.cpp
View file @
8ef7fbb4
...
...
@@ -34,10 +34,10 @@ zmq::pair_t::~pair_t ()
zmq_assert
(
!
pipe
);
}
void
zmq
::
pair_t
::
xattach_pipe
(
pipe_t
*
pipe_
,
bool
icanhas
all_
)
void
zmq
::
pair_t
::
xattach_pipe
(
pipe_t
*
pipe_
,
bool
subscribe_to_
all_
)
{
//
icanhas
all_ is unused
(
void
)
icanhas
all_
;
//
subscribe_to_
all_ is unused
(
void
)
subscribe_to_
all_
;
zmq_assert
(
pipe_
!=
NULL
);
...
...
src/pair.hpp
View file @
8ef7fbb4
...
...
@@ -40,7 +40,7 @@ namespace zmq
~
pair_t
();
// Overloads of functions from socket_base_t.
void
xattach_pipe
(
zmq
::
pipe_t
*
pipe_
,
bool
icanhas
all_
);
void
xattach_pipe
(
zmq
::
pipe_t
*
pipe_
,
bool
subscribe_to_
all_
);
int
xsend
(
zmq
::
msg_t
*
msg_
);
int
xrecv
(
zmq
::
msg_t
*
msg_
);
bool
xhas_in
();
...
...
src/pull.cpp
View file @
8ef7fbb4
...
...
@@ -32,10 +32,10 @@ zmq::pull_t::~pull_t ()
{
}
void
zmq
::
pull_t
::
xattach_pipe
(
pipe_t
*
pipe_
,
bool
icanhas
all_
)
void
zmq
::
pull_t
::
xattach_pipe
(
pipe_t
*
pipe_
,
bool
subscribe_to_
all_
)
{
//
icanhas
all_ is unused
(
void
)
icanhas
all_
;
//
subscribe_to_
all_ is unused
(
void
)
subscribe_to_
all_
;
zmq_assert
(
pipe_
);
fq
.
attach
(
pipe_
);
...
...
src/pull.hpp
View file @
8ef7fbb4
...
...
@@ -43,7 +43,7 @@ namespace zmq
protected
:
// Overloads of functions from socket_base_t.
void
xattach_pipe
(
zmq
::
pipe_t
*
pipe_
,
bool
icanhas
all_
);
void
xattach_pipe
(
zmq
::
pipe_t
*
pipe_
,
bool
subscribe_to_
all_
);
int
xrecv
(
zmq
::
msg_t
*
msg_
);
bool
xhas_in
();
void
xread_activated
(
zmq
::
pipe_t
*
pipe_
);
...
...
src/push.cpp
View file @
8ef7fbb4
...
...
@@ -32,10 +32,10 @@ zmq::push_t::~push_t ()
{
}
void
zmq
::
push_t
::
xattach_pipe
(
pipe_t
*
pipe_
,
bool
icanhas
all_
)
void
zmq
::
push_t
::
xattach_pipe
(
pipe_t
*
pipe_
,
bool
subscribe_to_
all_
)
{
//
icanhas
all_ is unused
(
void
)
icanhas
all_
;
//
subscribe_to_
all_ is unused
(
void
)
subscribe_to_
all_
;
zmq_assert
(
pipe_
);
lb
.
attach
(
pipe_
);
...
...
src/push.hpp
View file @
8ef7fbb4
...
...
@@ -43,7 +43,7 @@ namespace zmq
protected
:
// Overloads of functions from socket_base_t.
void
xattach_pipe
(
zmq
::
pipe_t
*
pipe_
,
bool
icanhas
all_
);
void
xattach_pipe
(
zmq
::
pipe_t
*
pipe_
,
bool
subscribe_to_
all_
);
int
xsend
(
zmq
::
msg_t
*
msg_
);
bool
xhas_out
();
void
xwrite_activated
(
zmq
::
pipe_t
*
pipe_
);
...
...
src/router.cpp
View file @
8ef7fbb4
...
...
@@ -53,10 +53,10 @@ zmq::router_t::~router_t ()
prefetched_msg
.
close
();
}
void
zmq
::
router_t
::
xattach_pipe
(
pipe_t
*
pipe_
,
bool
icanhas
all_
)
void
zmq
::
router_t
::
xattach_pipe
(
pipe_t
*
pipe_
,
bool
subscribe_to_
all_
)
{
//
icanhas
all_ is unused
(
void
)
icanhas
all_
;
//
subscribe_to_
all_ is unused
(
void
)
subscribe_to_
all_
;
zmq_assert
(
pipe_
);
...
...
src/router.hpp
View file @
8ef7fbb4
...
...
@@ -45,7 +45,7 @@ namespace zmq
~
router_t
();
// Overloads of functions from socket_base_t.
void
xattach_pipe
(
zmq
::
pipe_t
*
pipe_
,
bool
icanhas
all_
);
void
xattach_pipe
(
zmq
::
pipe_t
*
pipe_
,
bool
subscribe_to_
all_
);
int
xsetsockopt
(
int
option_
,
const
void
*
optval_
,
size_t
optvallen_
);
int
xsend
(
zmq
::
msg_t
*
msg_
);
int
xrecv
(
zmq
::
msg_t
*
msg_
);
...
...
src/socket_base.cpp
View file @
8ef7fbb4
...
...
@@ -221,14 +221,14 @@ int zmq::socket_base_t::check_protocol (const std::string &protocol_)
return
0
;
}
void
zmq
::
socket_base_t
::
attach_pipe
(
pipe_t
*
pipe_
,
bool
icanhas
all_
)
void
zmq
::
socket_base_t
::
attach_pipe
(
pipe_t
*
pipe_
,
bool
subscribe_to_
all_
)
{
// First, register the pipe so that we can terminate it later on.
pipe_
->
set_event_sink
(
this
);
pipes
.
push_back
(
pipe_
);
// Let the derived socket type know about new pipe.
xattach_pipe
(
pipe_
,
icanhas
all_
);
xattach_pipe
(
pipe_
,
subscribe_to_
all_
);
// If the socket is already being closed, ask any new pipes to terminate
// straight away.
...
...
@@ -556,10 +556,10 @@ int zmq::socket_base_t::connect (const char *addr_)
// PGM does not support subscription forwarding; ask for all data to be
// sent to this pipe.
bool
icanhas
all
=
protocol
==
"pgm"
||
protocol
==
"epgm"
;
bool
subscribe_to_
all
=
protocol
==
"pgm"
||
protocol
==
"epgm"
;
pipe_t
*
newpipe
=
NULL
;
if
(
options
.
immediate
!=
1
||
icanhas
all
)
{
if
(
options
.
immediate
!=
1
||
subscribe_to_
all
)
{
// Create a bi-directional pipe.
object_t
*
parents
[
2
]
=
{
this
,
session
};
pipe_t
*
new_pipes
[
2
]
=
{
NULL
,
NULL
};
...
...
@@ -579,7 +579,7 @@ int zmq::socket_base_t::connect (const char *addr_)
errno_assert
(
rc
==
0
);
// Attach local end of the pipe to the socket object.
attach_pipe
(
new_pipes
[
0
],
icanhas
all
);
attach_pipe
(
new_pipes
[
0
],
subscribe_to_
all
);
newpipe
=
new_pipes
[
0
];
// Attach remote end of the pipe to the session object later on.
...
...
src/socket_base.hpp
View file @
8ef7fbb4
...
...
@@ -125,7 +125,7 @@ namespace zmq
// Concrete algorithms for the x- methods are to be defined by
// individual socket types.
virtual
void
xattach_pipe
(
zmq
::
pipe_t
*
pipe_
,
bool
icanhas
all_
=
false
)
=
0
;
bool
subscribe_to_
all_
=
false
)
=
0
;
// The default implementation assumes there are no specific socket
// options for the particular socket type. If not so, overload this
...
...
@@ -197,7 +197,7 @@ namespace zmq
int
check_protocol
(
const
std
::
string
&
protocol_
);
// Register the pipe with this socket.
void
attach_pipe
(
zmq
::
pipe_t
*
pipe_
,
bool
icanhas
all_
=
false
);
void
attach_pipe
(
zmq
::
pipe_t
*
pipe_
,
bool
subscribe_to_
all_
=
false
);
// Processes commands sent to this socket (if any). If timeout is -1,
// returns only after at least one command was processed.
...
...
src/stream.cpp
View file @
8ef7fbb4
...
...
@@ -46,10 +46,10 @@ zmq::stream_t::~stream_t ()
prefetched_msg
.
close
();
}
void
zmq
::
stream_t
::
xattach_pipe
(
pipe_t
*
pipe_
,
bool
icanhas
all_
)
void
zmq
::
stream_t
::
xattach_pipe
(
pipe_t
*
pipe_
,
bool
subscribe_to_
all_
)
{
//
icanhas
all_ is unused
(
void
)
icanhas
all_
;
//
subscribe_to_
all_ is unused
(
void
)
subscribe_to_
all_
;
zmq_assert
(
pipe_
);
...
...
src/stream.hpp
View file @
8ef7fbb4
...
...
@@ -39,7 +39,7 @@ namespace zmq
~
stream_t
();
// Overloads of functions from socket_base_t.
void
xattach_pipe
(
zmq
::
pipe_t
*
pipe_
,
bool
icanhas
all_
);
void
xattach_pipe
(
zmq
::
pipe_t
*
pipe_
,
bool
subscribe_to_
all_
);
int
xsend
(
zmq
::
msg_t
*
msg_
);
int
xrecv
(
zmq
::
msg_t
*
msg_
);
bool
xhas_in
();
...
...
src/xpub.cpp
View file @
8ef7fbb4
...
...
@@ -36,14 +36,14 @@ zmq::xpub_t::~xpub_t ()
{
}
void
zmq
::
xpub_t
::
xattach_pipe
(
pipe_t
*
pipe_
,
bool
icanhas
all_
)
void
zmq
::
xpub_t
::
xattach_pipe
(
pipe_t
*
pipe_
,
bool
subscribe_to_
all_
)
{
zmq_assert
(
pipe_
);
dist
.
attach
(
pipe_
);
// If
icanhas
all_ is specified, the caller would like to subscribe
// If
subscribe_to_
all_ is specified, the caller would like to subscribe
// to all data on this pipe, implicitly.
if
(
icanhas
all_
)
if
(
subscribe_to_
all_
)
subscriptions
.
add
(
NULL
,
0
,
pipe_
);
// The pipe is active when attached. Let's read the subscriptions from
...
...
src/xpub.hpp
View file @
8ef7fbb4
...
...
@@ -46,7 +46,7 @@ namespace zmq
~
xpub_t
();
// Implementations of virtual functions from socket_base_t.
void
xattach_pipe
(
zmq
::
pipe_t
*
pipe_
,
bool
icanhas
all_
=
false
);
void
xattach_pipe
(
zmq
::
pipe_t
*
pipe_
,
bool
subscribe_to_
all_
=
false
);
int
xsend
(
zmq
::
msg_t
*
msg_
);
bool
xhas_out
();
int
xrecv
(
zmq
::
msg_t
*
msg_
);
...
...
src/xsub.cpp
View file @
8ef7fbb4
...
...
@@ -43,10 +43,10 @@ zmq::xsub_t::~xsub_t ()
errno_assert
(
rc
==
0
);
}
void
zmq
::
xsub_t
::
xattach_pipe
(
pipe_t
*
pipe_
,
bool
icanhas
all_
)
void
zmq
::
xsub_t
::
xattach_pipe
(
pipe_t
*
pipe_
,
bool
subscribe_to_
all_
)
{
//
icanhas
all_ is unused
(
void
)
icanhas
all_
;
//
subscribe_to_
all_ is unused
(
void
)
subscribe_to_
all_
;
zmq_assert
(
pipe_
);
fq
.
attach
(
pipe_
);
...
...
src/xsub.hpp
View file @
8ef7fbb4
...
...
@@ -44,7 +44,7 @@ namespace zmq
protected
:
// Overloads of functions from socket_base_t.
void
xattach_pipe
(
zmq
::
pipe_t
*
pipe_
,
bool
icanhas
all_
);
void
xattach_pipe
(
zmq
::
pipe_t
*
pipe_
,
bool
subscribe_to_
all_
);
int
xsend
(
zmq
::
msg_t
*
msg_
);
bool
xhas_out
();
int
xrecv
(
zmq
::
msg_t
*
msg_
);
...
...
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