summaryrefslogtreecommitdiff
path: root/src/ctx.cpp
AgeCommit message (Collapse)Author
2012-02-16XS_CTX_MAX_SOCKETS option implementedMartin Sustrik
To implement context options properly, initialisation of context is postponed till creation of the first socket. In the meantime it is possible to set socket options. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Windows version of the tests implementedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.cpm>
2012-02-16Race condition in zmq_term() fixedMartin Sustrik
It was possible to open a new socket while the log socket was being shut down. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16ZeroMQ renamed to CrossroadsMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16More logging infrastructureMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Logging functionality available for individual objectsMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Old logging infrastructure removedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Monitor object addedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Socket ID addedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-10-31250bpm copyrights addedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-19Merge branch 'master' of github.com:zeromq/libzmqMartin Sustrik
2011-06-18Refactor Windows versioning and WinSock usage.Signed-off-by: Steven McCoy ↵Steven McCoy
<steven.mccoy@miru.hk>
2011-06-17Add sockopt ZMQ_RCVTIMEO/ZMQ_SNDTIMEO.Fabien Ninoles
- Add doc and tests - Add options and setup - Wait using poll/select Signed-off-by: Fabien Ninoles <fabien@tzone.org> Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-13Reverting previous commit that broke MSVC2010 buildMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-12Fix scope on Windows includes.Steven McCoy
Fix windows.h included before winsock2.h. Remove definition of _WINSOCKAPI_. Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
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-04-09Run-time checking for context & socket validity addedMartin 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>
2011-02-12Fixed win32 issue with WSAStartupPieter Hintjens
- ctx constructor was calling mailbox_t constructor implicitly - moved WSAStartup and WSACleanup to be outside constructor/destructor Signed-off-by: Pieter Hintjens <ph@imatix.com>
2011-02-09Initial implementation of reaper thread.Martin Sustrik
Reaper thread destroys the socket asynchronously. zmq_term() can be interrupted by a signal (EINTR). zmq_socket() will return ETERM after zmq_term() was called. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-08max_sockets honoured preciselyMartin Sustrik
The internal log socket was subtracted from the number of available sockets. So, if max_sockets was set to 100, you could create only 99 sockets. Fixed. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-01-18Fix cppcheck warnings: Prefer prefix ++/-- operators for non-primitive types.Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-01-10Size of inproc hwm and swap is sum of peers' hwms and swapsMartin Sustrik
The meat of the patch was contributed by Douglas Creager. Martin Sustrik implemented storing peer options in inproc endpoint repository. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-05signaler renamed to mailboxMartin Sustrik
For historical reasons queue to transfer commands between threads was called 'signaler'. Given that it was used to pass commands rather than signals it was renamed to 'mailbox', see Erlang mailboxes. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-05slots renamed to tidsMartin Sustrik
Threads were so far identified by integers called 'slots'. This patch renames them to more comprehensible 'tid's (thread IDs). 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-14To insert to associateive STL containers value_type used instead of make_pairMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-09-27MSVC build fixedMartin Sustrik
2010-09-19minor code reorganisation in ctx_t::terminateMartin Sustrik
2010-09-19synchronisation problem fixed in ctx_tMartin Sustrik
2010-09-09when no I/O threads are available error is raised instead of assertionMartin Sustrik
2010-09-08EINTR returned from the blocking functionsMartin Sustrik
2010-09-01conflicts resolvedMartin Sustrik
2010-09-01sys transport introdced; inproc://log moved to sys://logMartin Sustrik
2010-09-01MSVC build fixedMartin Sustrik
2010-09-01context creates an inproc endpoint ('inproc://log') to distribute 0MQ's log ↵Martin Sustrik
messages
2010-08-25one more dezombification bug fixedMartin Sustrik
2010-08-25dezombification procedure fixedMartin Sustrik
2010-08-25I/O object hierarchy implementedMartin 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-10clearing thread info structurePiotr Trojanek
2010-05-05dispatcher_t class renamed to ctx_tMartin Sustrik