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
b9c09064
Commit
b9c09064
authored
Sep 12, 2013
by
Richard Newton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix whitespace
parent
d5bd68b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
socket_base.cpp
src/socket_base.cpp
+8
-8
No files found.
src/socket_base.cpp
View file @
b9c09064
...
@@ -1231,20 +1231,20 @@ void zmq::socket_base_t::event_disconnected (std::string &addr_, int fd_)
...
@@ -1231,20 +1231,20 @@ void zmq::socket_base_t::event_disconnected (std::string &addr_, int fd_)
void
zmq
::
socket_base_t
::
monitor_event
(
zmq_event_t
event_
,
const
std
::
string
&
addr_
)
void
zmq
::
socket_base_t
::
monitor_event
(
zmq_event_t
event_
,
const
std
::
string
&
addr_
)
{
{
if
(
monitor_socket
)
{
if
(
monitor_socket
)
{
const
uint16_t
eid
=
(
uint16_t
)
event_
.
event
;
const
uint16_t
eid
=
(
uint16_t
)
event_
.
event
;
const
uint32_t
value
=
(
uint32_t
)
event_
.
value
;
const
uint32_t
value
=
(
uint32_t
)
event_
.
value
;
// prepare and send first message frame
// prepare and send first message frame
// containing event id and value
// containing event id and value
zmq_msg_t
msg
;
zmq_msg_t
msg
;
zmq_msg_init_size
(
&
msg
,
sizeof
(
eid
)
+
sizeof
(
value
));
zmq_msg_init_size
(
&
msg
,
sizeof
(
eid
)
+
sizeof
(
value
));
char
*
data1
=
(
char
*
)
zmq_msg_data
(
&
msg
);
char
*
data1
=
(
char
*
)
zmq_msg_data
(
&
msg
);
memcpy
(
data1
,
&
eid
,
sizeof
(
eid
));
memcpy
(
data1
,
&
eid
,
sizeof
(
eid
));
memcpy
(
data1
+
sizeof
(
eid
),
&
value
,
sizeof
(
value
));
memcpy
(
data1
+
sizeof
(
eid
),
&
value
,
sizeof
(
value
));
zmq_sendmsg
(
monitor_socket
,
&
msg
,
ZMQ_SNDMORE
);
zmq_sendmsg
(
monitor_socket
,
&
msg
,
ZMQ_SNDMORE
);
// prepare and send second message frame
// prepare and send second message frame
// containing the address (endpoint)
// containing the address (endpoint)
zmq_msg_init_size
(
&
msg
,
addr_
.
size
());
zmq_msg_init_size
(
&
msg
,
addr_
.
size
());
memcpy
(
zmq_msg_data
(
&
msg
),
addr_
.
c_str
(),
addr_
.
size
());
memcpy
(
zmq_msg_data
(
&
msg
),
addr_
.
c_str
(),
addr_
.
size
());
zmq_sendmsg
(
monitor_socket
,
&
msg
,
0
);
zmq_sendmsg
(
monitor_socket
,
&
msg
,
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