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
8cd33339
Commit
8cd33339
authored
Sep 17, 2016
by
Constantin Rack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: source conatins trailing spaces
Solution: remove them
parent
022cf2ae
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
37 deletions
+37
-37
decoder.hpp
src/decoder.hpp
+1
-1
norm_engine.cpp
src/norm_engine.cpp
+0
-0
norm_engine.hpp
src/norm_engine.hpp
+36
-36
No files found.
src/decoder.hpp
View file @
8cd33339
...
...
@@ -119,7 +119,7 @@ namespace zmq
bytes_used_
=
size_
;
while
(
!
to_read
)
{
const
int
rc
=
const
int
rc
=
(
static_cast
<
T
*>
(
this
)
->*
next
)
(
data_
+
bytes_used_
);
if
(
rc
!=
0
)
return
rc
;
...
...
src/norm_engine.cpp
View file @
8cd33339
This diff is collapsed.
Click to expand it.
src/norm_engine.hpp
View file @
8cd33339
...
...
@@ -16,17 +16,17 @@ namespace zmq
{
class
io_thread_t
;
class
session_base_t
;
class
norm_engine_t
:
public
io_object_t
,
public
i_engine
{
public
:
norm_engine_t
(
zmq
::
io_thread_t
*
parent_
,
const
options_t
&
options_
);
~
norm_engine_t
();
// create NORM instance, session, etc
int
init
(
const
char
*
network_
,
bool
send
,
bool
recv
);
void
shutdown
();
// i_engine interface implementation.
// Plug the engine to the session.
virtual
void
plug
(
zmq
::
io_thread_t
*
io_thread_
,
...
...
@@ -45,43 +45,43 @@ namespace zmq
virtual
void
restart_output
();
virtual
void
zap_msg_available
()
{};
// i_poll_events interface implementation.
// (we only need in_event() for NormEvent notification)
// (i.e., don't have any output events or timers (yet))
void
in_event
();
private
:
void
unplug
();
void
send_data
();
void
recv_data
(
NormObjectHandle
stream
);
void
recv_data
(
NormObjectHandle
stream
);
enum
{
BUFFER_SIZE
=
2048
};
// Used to keep track of streams from multiple senders
// Used to keep track of streams from multiple senders
class
NormRxStreamState
{
public
:
NormRxStreamState
(
NormObjectHandle
normStream
,
int64_t
maxMsgSize
);
~
NormRxStreamState
();
NormObjectHandle
GetStreamHandle
()
const
{
return
norm_stream
;}
bool
Init
();
void
SetRxReady
(
bool
state
)
{
rx_ready
=
state
;}
bool
IsRxReady
()
const
{
return
rx_ready
;}
void
SetSync
(
bool
state
)
{
in_sync
=
state
;}
bool
InSync
()
const
{
return
in_sync
;}
// These are used to feed data to decoder
// and its underlying "msg" buffer
char
*
AccessBuffer
()
...
...
@@ -98,21 +98,21 @@ namespace zmq
// occurs the 'sync' is dropped and the
// decoder re-initialized
int
Decode
();
class
List
{
public
:
List
();
~
List
();
void
Append
(
NormRxStreamState
&
item
);
void
Remove
(
NormRxStreamState
&
item
);
bool
IsEmpty
()
const
{
return
(
NULL
==
head
);}
void
Destroy
();
class
Iterator
{
public
:
...
...
@@ -122,36 +122,36 @@ namespace zmq
NormRxStreamState
*
next_item
;
};
friend
class
Iterator
;
private
:
NormRxStreamState
*
head
;
NormRxStreamState
*
tail
;
NormRxStreamState
*
tail
;
};
// end class zmq::norm_engine_t::NormRxStreamState::List
friend
class
List
;
List
*
AccessList
()
{
return
list
;}
private
:
NormObjectHandle
norm_stream
;
int64_t
max_msg_size
;
bool
in_sync
;
bool
in_sync
;
bool
rx_ready
;
v2_decoder_t
*
zmq_decoder
;
bool
skip_norm_sync
;
unsigned
char
*
buffer_ptr
;
size_t
buffer_size
;
size_t
buffer_count
;
NormRxStreamState
*
prev
;
NormRxStreamState
*
next
;
NormRxStreamState
::
List
*
list
;
};
// end class zmq::norm_engine_t::NormRxStreamState
session_base_t
*
zmq_session
;
options_t
options
;
NormInstanceHandle
norm_instance
;
...
...
@@ -161,25 +161,25 @@ namespace zmq
bool
is_receiver
;
// Sender state
msg_t
tx_msg
;
v2_encoder_t
zmq_encoder
;
// for tx messages (we use v2 for now)
v2_encoder_t
zmq_encoder
;
// for tx messages (we use v2 for now)
NormObjectHandle
norm_tx_stream
;
bool
tx_first_msg
;
bool
tx_more_bit
;
bool
zmq_output_ready
;
// zmq has msg(s) to send
bool
zmq_output_ready
;
// zmq has msg(s) to send
bool
norm_tx_ready
;
// norm has tx queue vacancy
// TBD - maybe don't need buffer if can access zmq message buffer directly?
char
tx_buffer
[
BUFFER_SIZE
];
unsigned
int
tx_index
;
unsigned
int
tx_len
;
// Receiver state
// Lists of norm rx streams from remote senders
bool
zmq_input_ready
;
// zmq ready to receive msg(s)
NormRxStreamState
::
List
rx_pending_list
;
// rx streams waiting for data reception
NormRxStreamState
::
List
rx_ready_list
;
// rx streams ready for NormStreamRead()
NormRxStreamState
::
List
msg_ready_list
;
// rx streams w/ msg ready for push to zmq
};
// end class norm_engine_t
}
...
...
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