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
47c0b6ec
Commit
47c0b6ec
authored
May 16, 2016
by
somdoron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
problem: dgram doesn't need to prefetch messages
parent
d7919326
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
18 deletions
+1
-18
dgram.cpp
src/dgram.cpp
+1
-15
dgram.hpp
src/dgram.hpp
+0
-3
No files found.
src/dgram.cpp
View file @
47c0b6ec
...
...
@@ -40,7 +40,6 @@ zmq::dgram_t::dgram_t (class ctx_t *parent_, uint32_t tid_, int sid_) :
socket_base_t
(
parent_
,
tid_
,
sid_
),
pipe
(
NULL
),
last_in
(
NULL
),
prefetched
(
false
),
more_out
(
false
)
{
options
.
type
=
ZMQ_DGRAM
;
...
...
@@ -115,7 +114,7 @@ int zmq::dgram_t::xsend (msg_t *msg_)
// This is the last part of the message.
more_out
=
false
;
}
// Push the message into the pipe.
if
(
!
pipe
->
write
(
msg_
))
{
errno
=
EAGAIN
;
...
...
@@ -148,24 +147,11 @@ int zmq::dgram_t::xrecv (msg_t *msg_)
}
last_in
=
pipe
;
if
(
prefetched
)
{
msg_
->
reset_flags
(
msg_t
::
more
);
prefetched
=
false
;
}
else
{
msg_
->
set_flags
(
msg_t
::
more
);
prefetched
=
true
;
}
return
0
;
}
bool
zmq
::
dgram_t
::
xhas_in
()
{
// We may already have a message pre-fetched.
if
(
prefetched
)
return
true
;
if
(
!
pipe
)
return
false
;
...
...
src/dgram.hpp
View file @
47c0b6ec
...
...
@@ -68,9 +68,6 @@ namespace zmq
zmq
::
pipe_t
*
last_in
;
blob_t
saved_credential
;
// True iff there is a message held in the pre-fetch buffer.
bool
prefetched
;
// If true, more outgoing message parts are expected.
bool
more_out
;
...
...
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