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
67aa7885
Commit
67aa7885
authored
Aug 28, 2010
by
Guido Goldstein
Committed by
Martin Sustrik
Aug 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed socket states in tests
parent
4d9b0469
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
test_pair.cpp
tests/test_pair.cpp
+3
-0
test_reqrep.cpp
tests/test_reqrep.cpp
+3
-0
testutil.hpp
tests/testutil.hpp
+5
-1
No files found.
tests/test_pair.cpp
View file @
67aa7885
...
...
@@ -39,6 +39,9 @@ int main ()
{
const
string
returned
=
zmqtestutil
::
ping_pong
(
p
,
expect
);
assert
(
expect
==
returned
);
// Adjust socket state so that poll shows only 1 pending message.
zmq
::
message_t
mx
;
p
.
first
->
recv
(
&
mx
,
0
);
}
{
...
...
tests/test_reqrep.cpp
View file @
67aa7885
...
...
@@ -39,6 +39,9 @@ int main()
{
const
string
returned
=
zmqtestutil
::
ping_pong
(
p
,
expect
);
assert
(
expect
==
returned
);
// Adjust socket state, so that first is clean for another send.
zmq
::
message_t
mx
;
p
.
first
->
recv
(
&
mx
,
0
);
}
{
...
...
tests/testutil.hpp
View file @
67aa7885
...
...
@@ -55,8 +55,12 @@ namespace zmqtestutil
zmq
::
message_t
pong
;
s2
.
recv
(
&
pong
,
0
);
// Send message via s2, so state is clean in case of req/rep.
std
::
string
ret
((
char
*
)
pong
.
data
(),
pong
.
size
());
s2
.
send
(
pong
,
0
);
// Return received data as std::string.
return
std
::
string
((
char
*
)
pong
.
data
(),
pong
.
size
())
;
return
ret
;
}
}
...
...
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