Commit 8cd33339 authored by Constantin Rack's avatar Constantin Rack

Problem: source conatins trailing spaces

Solution: remove them
parent 022cf2ae
......@@ -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;
......
This diff is collapsed.
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment