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
5cd9f74a
Commit
5cd9f74a
authored
Apr 08, 2010
by
Martin Sustrik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
few fixed related to multi-part messages in REP socket
parent
77cbd18e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
rep.cpp
src/rep.cpp
+13
-8
No files found.
src/rep.cpp
View file @
5cd9f74a
...
...
@@ -93,8 +93,6 @@ void zmq::rep_t::xdetach_inpipe (class reader_t *pipe_)
void
zmq
::
rep_t
::
xdetach_outpipe
(
class
writer_t
*
pipe_
)
{
zmq_assert
(
!
sending_reply
||
!
more
||
reply_pipe
!=
pipe_
);
zmq_assert
(
pipe_
);
zmq_assert
(
in_pipes
.
size
()
==
out_pipes
.
size
());
...
...
@@ -182,19 +180,20 @@ int zmq::rep_t::xsend (zmq_msg_t *msg_, int flags_)
errno
=
EAGAIN
;
return
-
1
;
}
more
=
msg_
->
flags
&
ZMQ_MSG_MORE
;
}
else
{
// If the requester have disconnected in the meantime, drop the reply.
more
=
msg_
->
flags
&
ZMQ_MSG_MORE
;
zmq_msg_close
(
msg_
);
}
// Check whether it's last part of the reply.
more
=
msg_
->
flags
&
ZMQ_MSG_MORE
;
// Flush the reply to the requester.
if
(
!
more
)
{
reply_pipe
->
flush
();
if
(
reply_pipe
)
reply_pipe
->
flush
();
sending_reply
=
false
;
reply_pipe
=
NULL
;
}
...
...
@@ -243,7 +242,10 @@ int zmq::rep_t::xrecv (zmq_msg_t *msg_, int flags_)
bool
zmq
::
rep_t
::
xhas_in
()
{
if
(
!
sending_reply
&&
more
)
if
(
sending_reply
)
return
false
;
if
(
more
)
return
true
;
for
(
int
count
=
active
;
count
!=
0
;
count
--
)
{
...
...
@@ -259,7 +261,10 @@ bool zmq::rep_t::xhas_in ()
bool
zmq
::
rep_t
::
xhas_out
()
{
if
(
sending_reply
&&
more
)
if
(
!
sending_reply
)
return
false
;
if
(
more
)
return
true
;
// TODO: No check for write here...
...
...
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