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
7952c584
Commit
7952c584
authored
Mar 30, 2017
by
evoskuil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: xpub test has broken style (missing whitespace).
parent
1dd9cac2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
test_xpub_welcome_msg.cpp
tests/test_xpub_welcome_msg.cpp
+10
-10
No files found.
tests/test_xpub_welcome_msg.cpp
View file @
7952c584
...
...
@@ -31,7 +31,7 @@
int
main
(
void
)
{
setup_test_environment
();
setup_test_environment
();
void
*
ctx
=
zmq_ctx_new
();
assert
(
ctx
);
...
...
@@ -42,15 +42,15 @@ int main (void)
assert
(
rc
==
0
);
// set pub socket options
rc
=
zmq_setsockopt
(
pub
,
ZMQ_XPUB_WELCOME_MSG
,
"W"
,
1
);
rc
=
zmq_setsockopt
(
pub
,
ZMQ_XPUB_WELCOME_MSG
,
"W"
,
1
);
assert
(
rc
==
0
);
// Create a subscriber
void
*
sub
=
zmq_socket
(
ctx
,
ZMQ_SUB
);
// Subscribe to the welcome message
rc
=
zmq_setsockopt
(
sub
,
ZMQ_SUBSCRIBE
,
"W"
,
1
);
assert
(
rc
==
0
);
rc
=
zmq_setsockopt
(
sub
,
ZMQ_SUBSCRIBE
,
"W"
,
1
);
assert
(
rc
==
0
);
assert
(
sub
);
rc
=
zmq_connect
(
sub
,
"inproc://soname"
);
...
...
@@ -60,14 +60,14 @@ int main (void)
// Receive the welcome subscription
rc
=
zmq_recv
(
pub
,
buffer
,
2
,
0
);
assert
(
rc
==
2
);
assert
(
buffer
[
0
]
==
1
);
assert
(
buffer
[
1
]
==
'W'
);
assert
(
rc
==
2
);
assert
(
buffer
[
0
]
==
1
);
assert
(
buffer
[
1
]
==
'W'
);
// Receive the welcome message
rc
=
zmq_recv
(
sub
,
buffer
,
1
,
0
);
assert
(
rc
==
1
);
assert
(
buffer
[
0
]
==
'W'
);
rc
=
zmq_recv
(
sub
,
buffer
,
1
,
0
);
assert
(
rc
==
1
);
assert
(
buffer
[
0
]
==
'W'
);
// Clean up.
rc
=
zmq_close
(
pub
);
...
...
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