Fix a number of whitespace issues in various parts of the code, add validation to most calls on the test and take a first stab at implementing the reconnection pipe blocking.

It didn't seem straightforward to use any of the existing process calls, so I have added a new command to command_t and friends called detach. This instructs the socket_base to remove the pipe from it's pipe list. The session base stores a copy of the outpipe, and will resend the bind command on reconnection. This should allow balancing again.
This commit is contained in:
Ian Barber
2012-06-03 22:57:47 +01:00
parent 06485d9200
commit 6f6466f088
8 changed files with 98 additions and 30 deletions

View File

@@ -52,9 +52,6 @@ namespace zmq
// To be used once only, when creating the session.
void attach_pipe (zmq::pipe_t *pipe_);
// To be used once only, for delayed connection
void onconnect_attach_pipe (pipe_t *pipe_);
// Following functions are the interface exposed towards the engine.
virtual int read (msg_t *msg_);
@@ -106,7 +103,10 @@ namespace zmq
// Pipe connecting the session to its socket.
zmq::pipe_t *pipe;
// Socket end of pipe, in case of reconnection
zmq::pipe_t *outpipe;
// This flag is true if the remainder of the message being processed
// is still in the in pipe.
bool incomplete_in;