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
d3e0be15
Commit
d3e0be15
authored
Mar 16, 2014
by
bebopagogo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added uncommitted norm_engine changes
parent
33f22d0d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
17 deletions
+16
-17
encoder.hpp
src/encoder.hpp
+1
-1
norm_engine.cpp
src/norm_engine.cpp
+14
-13
norm_engine.hpp
src/norm_engine.hpp
+1
-3
No files found.
src/encoder.hpp
View file @
d3e0be15
...
...
@@ -60,7 +60,7 @@ namespace zmq
{
free
(
buf
);
}
// The function returns a batch of binary data. The data
// are filled to a supplied buffer. If no buffer is supplied (data_
// points to NULL) decoder object will provide buffer of its own.
...
...
src/norm_engine.cpp
View file @
d3e0be15
...
...
@@ -15,7 +15,7 @@ zmq::norm_engine_t::norm_engine_t(io_thread_t* parent_,
norm_instance
(
NORM_INSTANCE_INVALID
),
norm_session
(
NORM_SESSION_INVALID
),
is_sender
(
false
),
is_receiver
(
false
),
zmq_encoder
(
0
),
tx_more_bit
(
false
),
zmq_output_ready
(
false
),
norm_tx_stream
(
NORM_OBJECT_INVALID
),
norm_tx_ready
(
false
),
norm_tx_stream
(
NORM_OBJECT_INVALID
),
norm_tx_ready
(
false
),
tx_index
(
0
),
tx_len
(
0
),
zmq_input_ready
(
false
)
{
...
...
@@ -267,12 +267,14 @@ void zmq::norm_engine_t::send_data()
// Buffer contained end of message (should we flush?)
//NormStreamMarkEom(norm_tx_stream);
// Note this makes NORM fairly chatty for low duty cycle messaging
// but makes sure content is delivered quickly. Positive acknowledgements
// with flush override would make NORM more succinct here
NormStreamFlush
(
norm_tx_stream
,
true
,
NORM_FLUSH_ACTIVE
);
}
tx_index
=
tx_len
=
0
;
// all buffered data was written
}
// Still norm_tx_ready, so ask for more data from zmq_session
if
(
!
zmq_encoder
.
has_data
())
if
(
!
zmq_encoder
.
has_data
())
{
// Existing message had no more data to encode
if
(
-
1
==
zmq_session
->
pull_msg
(
&
tx_msg
))
...
...
@@ -333,20 +335,19 @@ void zmq::norm_engine_t::in_event()
break
;
case
NORM_RX_OBJECT_ABORTED
:
{
NormRxStreamState
*
rxState
=
(
NormRxStreamState
*
)
NormObjectGetUserData
(
event
.
object
);
if
(
NULL
!=
rxState
)
{
NormRxStreamState
*
rxState
=
(
NormRxStreamState
*
)
NormObjectGetUserData
(
event
.
object
);
if
(
NULL
!=
rxState
)
{
// Remove the state from the list it's in
// This is now unnecessary since deletion takes care of list removal
// but in the interest of being clear ...
NormRxStreamState
::
List
*
list
=
rxState
->
AccessList
();
if
(
NULL
!=
list
)
list
->
Remove
(
*
rxState
);
}
delete
rxState
;
// Remove the state from the list it's in
// This is now unnecessary since deletion takes care of list removal
// but in the interest of being clear ...
NormRxStreamState
::
List
*
list
=
rxState
->
AccessList
();
if
(
NULL
!=
list
)
list
->
Remove
(
*
rxState
);
}
delete
rxState
;
break
;
}
case
NORM_REMOTE_SENDER_INACTIVE
:
// Here we free resources used for this formerly active sender.
// Note w/ NORM_SYNC_STREAM, if sender reactivates, we may
...
...
src/norm_engine.hpp
View file @
d3e0be15
...
...
@@ -2,8 +2,6 @@
#ifndef __ZMQ_NORM_ENGINE_HPP_INCLUDED__
#define __ZMQ_NORM_ENGINE_HPP_INCLUDED__
#define ZMQ_HAVE_NORM 1
#if defined ZMQ_HAVE_NORM
#include "io_object.hpp"
...
...
@@ -12,7 +10,7 @@
#include "v2_decoder.hpp"
#include "v2_encoder.hpp"
#include <norm
/include/norm
Api.h>
#include <normApi.h>
namespace
zmq
{
...
...
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