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
4b948b1f
Commit
4b948b1f
authored
Feb 19, 2015
by
Thomas Rodgers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
cf0804bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
stream_engine.cpp
src/stream_engine.cpp
+9
-10
stream_engine.hpp
src/stream_engine.hpp
+3
-1
No files found.
src/stream_engine.cpp
View file @
4b948b1f
...
...
@@ -193,11 +193,9 @@ void zmq::stream_engine_t::plug (io_thread_t *io_thread_,
next_msg
=
&
stream_engine_t
::
pull_msg_from_session
;
process_msg
=
&
stream_engine_t
::
push_raw_msg_to_session
;
if
(
!
peer_address
.
empty
())
{
properties_t
properties
;
if
(
init_properties
(
properties
))
{
// Compile metadata.
typedef
metadata_t
::
dict_t
properties_t
;
properties_t
properties
;
properties
.
insert
(
std
::
make_pair
(
"Peer-Address"
,
peer_address
));
zmq_assert
(
metadata
==
NULL
);
metadata
=
new
(
std
::
nothrow
)
metadata_t
(
properties
);
}
...
...
@@ -812,13 +810,8 @@ void zmq::stream_engine_t::mechanism_ready ()
process_msg
=
&
stream_engine_t
::
write_credential
;
// Compile metadata.
typedef
metadata_t
::
dict_t
properties_t
;
properties_t
properties
;
// If we have a peer_address, add it to metadata
if
(
!
peer_address
.
empty
())
{
properties
.
insert
(
std
::
make_pair
(
"Peer-Address"
,
peer_address
));
}
init_properties
(
properties
);
// Add ZAP properties.
const
properties_t
&
zap_properties
=
mechanism
->
get_zap_properties
();
...
...
@@ -952,6 +945,12 @@ void zmq::stream_engine_t::set_handshake_timer ()
}
}
bool
zmq
::
stream_engine_t
::
init_properties
(
properties_t
&
properties
)
{
if
(
peer_address
.
empty
())
return
false
;
properties
.
insert
(
std
::
make_pair
(
"Peer-Address"
,
peer_address
));
return
true
;
}
void
zmq
::
stream_engine_t
::
timer_event
(
int
id_
)
{
zmq_assert
(
id_
==
handshake_timer_id
);
...
...
src/stream_engine.hpp
View file @
4b948b1f
...
...
@@ -77,7 +77,6 @@ namespace zmq
void
timer_event
(
int
id_
);
private
:
// Unplug the engine from the session.
void
unplug
();
...
...
@@ -115,6 +114,9 @@ namespace zmq
void
set_handshake_timer
();
typedef
metadata_t
::
dict_t
properties_t
;
bool
init_properties
(
properties_t
&
properties
);
// Underlying socket.
fd_t
s
;
...
...
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