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
628787c9
Commit
628787c9
authored
Oct 24, 2013
by
Richard Newton
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #720 from hintjens/master
test_stream failed when response was broken into frames
parents
770d52ec
65050b1b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
configure.ac
configure.ac
+11
-2
test_stream.cpp
tests/test_stream.cpp
+6
-7
No files found.
configure.ac
View file @
628787c9
...
...
@@ -102,8 +102,17 @@ if test "x$zmq_search_libsodium_lib" = "xyes"; then
fi
fi
# Set pedantic
libzmq_pedantic="yes"
AC_ARG_WITH([relaxed],
[AS_HELP_STRING([--with-relaxed],
[Switch off pedantic compiler])],
[zmq_relaxed="yes"],
[])
if test "x$zmq_relaxed" = "xyes"; then
libzmq_pedantic="no"
else
libzmq_pedantic="yes"
fi
# By default compiling with -Werror except OSX.
libzmq_werror="yes"
...
...
tests/test_stream.cpp
View file @
628787c9
...
...
@@ -89,15 +89,14 @@ test_stream_to_dealer (void)
assert
(
rc
==
sizeof
(
greeting
));
// Now we expect the data from the DEALER socket
// First frame is, again, the identity of the connection
rc
=
zmq_msg_recv
(
&
identity
,
stream
,
0
);
assert
(
rc
>
0
);
assert
(
zmq_msg_more
(
&
identity
));
// Second frame contains the rest of greeting along with
// the Ready command
// We want the rest of greeting along with the Ready command
int
bytes_read
=
0
;
while
(
bytes_read
<
97
)
{
// First frame is the identity of the connection (each time)
rc
=
zmq_msg_recv
(
&
identity
,
stream
,
0
);
assert
(
rc
>
0
);
assert
(
zmq_msg_more
(
&
identity
));
// Second frame contains the next chunk of data
rc
=
zmq_recv
(
stream
,
buffer
+
bytes_read
,
255
-
bytes_read
,
0
);
assert
(
rc
>=
0
);
bytes_read
+=
rc
;
...
...
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