diff options
| author | Martin Sustrik <sustrik@250bpm.com> | 2011-07-24 18:25:30 +0200 | 
|---|---|---|
| committer | Martin Sustrik <sustrik@250bpm.com> | 2011-07-24 18:25:30 +0200 | 
| commit | 7c1dca546d9e49e7af372e4fff9e6a87058a7f12 (patch) | |
| tree | f00c6760dcd14b944457928405e7e2eca23b1ff8 /src/encoder.cpp | |
| parent | f716b571baf59c1b622c7666bb8bf2905126a3d4 (diff) | |
Session classes merged into a single class
Removal of ZMQ_IDENTITY resulted in various session classes doing
almost the same thing. This patch merges the classes into a single
class.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/encoder.cpp')
| -rw-r--r-- | src/encoder.cpp | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/src/encoder.cpp b/src/encoder.cpp index a9be68c..087735d 100644 --- a/src/encoder.cpp +++ b/src/encoder.cpp @@ -19,12 +19,12 @@  */  #include "encoder.hpp" -#include "i_engine.hpp" +#include "session.hpp"  #include "wire.hpp"  zmq::encoder_t::encoder_t (size_t bufsize_) :      encoder_base_t <encoder_t> (bufsize_), -    sink (NULL) +    session (NULL)  {      int rc = in_progress.init ();      errno_assert (rc == 0); @@ -39,9 +39,9 @@ zmq::encoder_t::~encoder_t ()      errno_assert (rc == 0);  } -void zmq::encoder_t::set_sink (i_engine_sink *sink_) +void zmq::encoder_t::set_session (session_t *session_)  { -    sink = sink_; +    session = session_;  }  bool zmq::encoder_t::size_ready () @@ -62,7 +62,7 @@ bool zmq::encoder_t::message_ready ()      //  Note that new state is set only if write is successful. That way      //  unsuccessful write will cause retry on the next state machine      //  invocation. -    if (!sink || !sink->read (&in_progress)) { +    if (!session || !session->read (&in_progress)) {          rc = in_progress.init ();          errno_assert (rc == 0);          return false; | 
