summaryrefslogtreecommitdiff
path: root/src/session.cpp
AgeCommit message (Collapse)Author
2011-06-19Session termination error fixedMartin Sustrik
When session is already terminating and reconnection happens at that point, the session should not create new pipe to its socket. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-31Session termination induced by socket fixedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-30Patches from sub-forward branch incorporatedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-26Pending messages are delivered even if connection doesn't exist yetMartin Sustrik
Bug in previous refactoring fixed. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-25All pipe termination code moved to pipe_tMartin Sustrik
Till now the code was spread over mutliple locations. Additionally, the code was made more formally correct, with explicit pipe state machine etc. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-22Introduces bi-directional pipesMartin Sustrik
So far, there was a pair of unidirectional pipes between a socket and a session (or an inproc peer). This resulted in complex problems with half-closed states and tracking which inpipe corresponds to which outpipe. This patch doesn't add any functionality in itself, but is essential for further work on features like subscription forwarding. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-21Message-related functionality factored out into msg_t class.Martin Sustrik
This patch addresses serveral issues: 1. It gathers message related functionality scattered over whole codebase into a single class. 2. It makes zmq_msg_t an opaque datatype. Internals of the class don't pollute zmq.h header file. 3. zmq_msg_t size decreases from 48 to 32 bytes. That saves ~33% of memory in scenarios with large amount of small messages. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24ZMQ_HWM split into ZMQ_SNDHWM and ZMQ_RCVHWMMartin Sustrik
These new options allow to control the maximum size of the inbound and outbound message pipe separately. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24SWAP functionality removedMartin Sustrik
On-disk storage should be implemented in devices rather than in 0MQ core. 0MQ is a networking library and there's no point in storing network buffers on disk. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-16Duplicate identities now checked with zmq_connectMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-02The copyrights in file headers updated.Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-22Added explicit error message in case of memory exhaustionMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-18Logging of duplicit identities addedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-30Name of "GNU Lesser Public License" corrected.Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-27fix typo, destroy new engineDhammika Pathirana
Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
2010-10-26drop connection requests with duplicate peer identityDhammika Pathirana
Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
2010-10-18Minor comment improvement.Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-16ZMQ_LINGER socket option added.Martin Sustrik
1. ZMQ_LINGER option can be set/get 2. options are part of own_t base class rather than being declared separately by individual objects 3. Linger option is propagated with "term" command so that the newest value of it is used rather than the stored old one. 4. Session sets the linger timer if needed and terminates as soon as it expires. 5. Corresponding documentation updated. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-13Clean-up of the code related to attaching/detaching engines to sessions.Martin Sustrik
Session base class now handles the engine events exclusively. It notifies derived session types using dedicated "attached" and "detached" events. Couple of bugs was fixed along the way. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-12Avoid duplicate creation of pipes for a single sessionMartin Sustrik
When a session is being closed down its inbound and outbound pipe pointers are set to null. If (re) connection happens at that time, session may try to reinistantiate the pipes which is wrong. This patch allows session to attach pipes only once in its lifetime. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-08More cleanup of session termination process.Martin Sustrik
Fix in termination of session attached to a REP socket. Several fixes of session termination in case of disconnection. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-08Clean-up of session termination processMartin Sustrik
Specifically, shutdown of child objects is initiated *before* termination handshake with socket object. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-09-20problem with engine being attached to session while it's being terminated fixedMartin Sustrik
2010-09-19termination of pipe via delimiter message could stuck when no data were read ↵Martin Sustrik
from the pipe (because connection wasn't active) -- fixed
2010-09-19obsolete 'active' flag removed from session_tMartin Sustrik
2010-09-17reconnection process fixed when failure occurs during init phaseMartin Sustrik
2010-08-25elementary fixes to the named sessionMartin Sustrik
2010-08-25sessions created by listerner are correctly shut downMartin Sustrik
2010-08-25engine leak fixed; pgm compilation fixedMartin Sustrik
2010-08-25engine termination on disconnect fixedMartin Sustrik
2010-08-25I/O object hierarchy implementedMartin Sustrik
2010-08-25Destruction of session is delayed till both in & out pipes are closedMartin Sustrik
2010-08-25WIP: Socket migration between threads, new zmq_close() semanticsMartin Sustrik
Sockets may now be migrated between OS threads; sockets may not be used by more than one thread at any time. To migrate a socket to another thread the caller must ensure that a full memory barrier is called before using the socket from the target thread. The new zmq_close() semantics implement the behaviour discussed at: http://lists.zeromq.org/pipermail/zeromq-dev/2010-July/004244.html Specifically, zmq_close() is now deterministic and while it still returns immediately, it does not discard any data that may still be queued for sending. Further, zmq_term() will now block until all outstanding data has been sent. TODO: Many bugs have been introduced, needs testing. Further, SO_LINGER or an equivalent mechanism (possibly a configurable timeout to zmq_term()) needs to be implemented.
2010-06-21Add SWAP supportMartin Hurton
2010-05-25LWM is computed rather than explicitly specified by userMartin Sustrik
2010-04-07unitialised member in seesion_t class - fixedMartin Sustrik
2010-03-27ZMQ_TBC renamed to ZMQ_MOREMartin Sustrik
2010-03-20rollback of half-processed messages in case of disconnectionMartin Sustrik
2010-03-20XREP-style prefixing/trimming messages removedMartin Sustrik
2010-03-12Implement flow controlMartin Hurton
This commit introduces the necessary changes necessary for implementing flow control. None of the socket types implements the flow control yet. The code will crash when the flow control is enabled and the thw lwm is reached. The following commits will add flow-control support for individual socket types.
2010-02-19don't check for identity, if the connection is anonymousMartin Sustrik
2010-02-19Multi-hop REQ/REP, part XII., generate unique identities for anonymous ↵Martin Sustrik
connections
2010-02-16Multi-hop REQ/REP, part XI., finalise the XREQ/XREP functionalityMartin Sustrik
2010-02-14Multi-hop REQ/REP, part X., optional delayed creation of pipes during connectMartin Sustrik
2010-02-13Multi-hop REQ/REP, part IX., pass the peer identity as far as socket_base_tMartin Sustrik
2010-02-13Multi-hop REQ/REP, part VIII., new blob_t type used for holding identityMartin Sustrik
2010-02-13Multi-hop REQ/REP, part VII., identity-related algorithms rewrittenMartin Sustrik
2010-02-13Multi-hop REQ/REP, part VI., session 'name' renamed to 'peer_identity'Martin Sustrik
2010-02-12Multi-hop REQ/REP, part V., peer identity is passed from init object to sessionMartin Sustrik
2010-01-21ZMQII-43: Race condition when writing to pipeMartin Sustrik