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
52ed4cdc
Commit
52ed4cdc
authored
May 27, 2012
by
Martin Hurton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dead code
parent
7cfd03ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
31 deletions
+5
-31
session_base.cpp
src/session_base.cpp
+1
-7
stream_engine.cpp
src/stream_engine.cpp
+4
-24
No files found.
src/session_base.cpp
View file @
52ed4cdc
...
...
@@ -280,13 +280,7 @@ void zmq::session_base_t::process_plug ()
void
zmq
::
session_base_t
::
process_attach
(
i_engine
*
engine_
)
{
// If some other object (e.g. init) notifies us that the connection failed
// without creating an engine we need to start the reconnection process.
if
(
!
engine_
)
{
zmq_assert
(
!
engine
);
detached
();
return
;
}
zmq_assert
(
engine_
!=
NULL
);
// Create the pipe if it does not exist yet.
if
(
!
pipe
&&
!
is_terminating
())
{
...
...
src/stream_engine.cpp
View file @
52ed4cdc
...
...
@@ -52,7 +52,6 @@ zmq::stream_engine_t::stream_engine_t (fd_t fd_, const options_t &options_) :
outsize
(
0
),
encoder
(
out_batch_size
),
session
(
NULL
),
leftover_session
(
NULL
),
options
(
options_
),
plugged
(
false
)
{
...
...
@@ -109,7 +108,6 @@ void zmq::stream_engine_t::plug (io_thread_t *io_thread_,
{
zmq_assert
(
!
plugged
);
plugged
=
true
;
leftover_session
=
NULL
;
// Connect to session object.
zmq_assert
(
!
session
);
...
...
@@ -144,7 +142,6 @@ void zmq::stream_engine_t::unplug ()
// Disconnect from session object.
encoder
.
set_session
(
NULL
);
decoder
.
set_session
(
NULL
);
leftover_session
=
session
;
session
=
NULL
;
endpoint
.
clear
();
}
...
...
@@ -185,12 +182,8 @@ void zmq::stream_engine_t::in_event ()
else
{
// Stop polling for input if we got stuck.
if
(
processed
<
insize
)
{
// This may happen if queue limits are in effect.
if
(
plugged
)
reset_pollin
(
handle
);
}
if
(
processed
<
insize
)
reset_pollin
(
handle
);
// Adjust the buffer.
inpos
+=
processed
;
...
...
@@ -198,20 +191,14 @@ void zmq::stream_engine_t::in_event ()
}
// Flush all messages the decoder may have produced.
// If IO handler has unplugged engine, flush transient IO handler.
if
(
unlikely
(
!
plugged
))
{
zmq_assert
(
leftover_session
);
leftover_session
->
flush
();
}
else
{
session
->
flush
();
}
session
->
flush
();
// Input error has occurred. If the last decoded
// message has already been accepted, we terminate
// the engine immediately. Otherwise, we stop
// waiting for input events and postpone the termination
// until after the session has accepted the message.
if
(
session
!=
NULL
&&
disconnection
)
{
if
(
disconnection
)
{
input_error
=
true
;
if
(
decoder
.
stalled
())
reset_pollin
(
handle
);
...
...
@@ -228,13 +215,6 @@ void zmq::stream_engine_t::out_event ()
outpos
=
NULL
;
encoder
.
get_data
(
&
outpos
,
&
outsize
);
// If IO handler has unplugged engine, flush transient IO handler.
if
(
unlikely
(
!
plugged
))
{
zmq_assert
(
leftover_session
);
leftover_session
->
flush
();
return
;
}
// If there is no data to send, stop polling for output.
if
(
outsize
==
0
)
{
reset_pollout
(
handle
);
...
...
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