67 Commits

Author SHA1 Message Date
Martin Sustrik
936dbf956b dezombification procedure fixed 2010-08-25 15:39:20 +02:00
Martin Lucina
ee1f1af009 zmq_poll(): Fix some corner cases
Trying to optimize out the case where items_[i]. events is 0 would
result in a bogus pollfds[i]. Similarly in the select()-based impl,
while not strictly necessary it's better to get ZMQ_FD even if
events is 0 since that detects ETERM and friends.
2010-08-25 15:39:20 +02:00
Martin Lucina
a85d1e51bf zmq_poll(): Rewrite to use ZMQ_FD/ZMQ_EVENTS pt2
Rewrite the select()-based zmq_poll() implementation to use
ZMQ_FD and ZMQ_EVENTS.

Also fix some corner cases: We should not pollute revents with
unrequested events, and we don't need to poll on ZMQ_FD at all
if a pollitem with no events set was passed in.
2010-08-25 15:39:20 +02:00
Martin Lucina
6b1ca2cb1e Fix whitespace
Dunno where those <TAB>s came from...
2010-08-25 15:39:20 +02:00
Martin Lucina
cd12508418 zmq_poll(): Rewrite to use ZMQ_FD/ZMQ_EVENTS pt1
Rewrite zmq_poll() to use ZMQ_FD and ZMQ_EVENTS introduced on the
wip-shutdown branch. Only do the poll()-based version of zmq_poll (), the
select()-based version will not compile at the moment.
2010-08-25 15:39:20 +02:00
Martin Sustrik
05d908492d WIP: Socket migration between threads, new zmq_close() semantics
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-08-25 15:39:20 +02:00
Martin Lucina
b66dd7afd2 zmq_stopwatch_stop: Don't return EFAULT
Function returning unsigned long int cannot return (-1)
2010-08-25 09:50:45 +02:00
Pieter Hintjens
b6cdd369e3 Added error checking (EFAULT) for null arguments
* Fixed zmq_term, zmq_socket, zmq_close, zmq_setsockopt,
* zmq_getsockopt, zmq_bind, zmq_connect, zmq_send,
* zmq_recv, zmq_poll, zmq_device, zmq_stopwatch_stop
* Updated Reference Manual for these methods
2010-08-08 11:43:32 +02:00
Pieter Hintjens
677b3d906a Added not-null assertions on pointer arguments in C API functions
* zmq_term
* zmq_socket
* zmq_close
* zmq_setsockopt
* zmq_getsockopt
* zmq_bind
* zmq_connect
* zmq_send
* zmq_recv
* zmq_poll
* zmq_device
* zmq_stopwatch_stop
2010-08-07 20:55:07 +02:00
Martin Sustrik
cff7ba2315 Windows build fixed 2010-06-17 17:09:51 +02:00
Martin Sustrik
7f01e9970d stopwatch returned to libzmq 2010-06-17 16:51:53 +02:00
Martin Sustrik
67ca7dcbe6 obsolete API elements removed - this commit breaks backward compatibility 2010-06-04 15:24:06 +02:00
Martin Lucina
606c77368c Move perf helper functions to perf/helpers.cpp 2010-06-04 14:48:49 +02:00
Martin Sustrik
a25414e55c Fix in zmq_poll (Windows version) 2010-05-09 16:59:15 +02:00
Martin Sustrik
f60d891b23 Issue 23. zmq_init() crashes on illegal numbers 2010-05-06 10:33:01 +02:00
Martin Sustrik
835e893e54 dispatcher_t class renamed to ctx_t 2010-05-05 14:24:54 +02:00
Martin Sustrik
44dd005ff0 number of application threads to use 0MQ sockets is unlimited; app_threads parameter in zmq_init is unused and obsolete 2010-05-05 13:03:26 +02:00
Martin Sustrik
ae93ed318a signaler rewritten in such a way that any number (>64) of threads can be used 2010-04-29 20:34:48 +02:00
Martin Sustrik
c193fd1466 lock-free polling removed; ZMQ_POLL flag removed 2010-04-29 17:20:23 +02:00
Martin Sustrik
7668e7976d zmq_poll returns ETERM in case of context termination 2010-04-12 09:57:34 +02:00
Martin Sustrik
fba28c7c0c issue 1 - Change zmq_term semantics 2010-04-11 16:36:27 +02:00
Martin Sustrik
716f4ac871 zmq_getsockopt function added 2010-04-09 13:04:15 +02:00
Martin Sustrik
027bb1d2a7 issue 10 - zmq_strerror problem on Windows 2010-04-08 19:20:42 +02:00
Jon Dyte
edfd05df8e devices can be created via API 2010-04-07 08:20:01 +02:00
Martin Sustrik
8d8e0857be as advertised, zmq_flush and ZMQ_NOFLUSH were removed 2010-03-27 14:50:35 +01:00
Martin Sustrik
61ad236e95 ZMQ_NOFLUSH and zmq_flush obsoleted 2010-03-13 14:40:10 +01:00
Martin Lucina
27e2d08449 Restructure language bindings
C and C++ headers moved from bindings/ to include/, bindings/ removed
--with-c and --with-cpp options to configure removed, C and C++ now built
and installed by default
2010-03-11 20:33:27 +01:00
Martin Sustrik
531c6af0d4 message flags added to zmq_msg_t strcuture 2010-03-09 16:56:53 +01:00
unknown
157a66fc42 polling on POSIX sockets returns POLLERR (win32) 2010-03-01 18:33:16 +01:00
Martin Sustrik
4e7158b67d return POLLERR from polling on POSIX sockets (linux version) 2010-03-01 17:40:39 +01:00
Martin Sustrik
2441ef11a2 zmq_errno helper function added 2010-02-23 23:28:25 +01:00
Martin Sustrik
f24955519a zmq_poll doesn't exit when infinite timeout is set and interrupt occurs 2010-02-22 18:19:26 +01:00
Martin Lucina
2a79a943de Add NetBSD support 2010-02-18 19:38:15 +01:00
Martin Lucina
30b967e2a4 Integrate version numbering into autoconf
configure.in is now the master source for the package version number,
this propagates to src/platform.hpp (for zmq_version) and doc/Makefile.am
(for documentation generation) automagically.
2010-02-11 17:49:40 +01:00
Martin Sustrik
bd9213e712 ZMQII-72: Add zmq_version function 2010-02-11 10:29:33 +01:00
Martin Sustrik
8c25bab31d ZMQII-70: zmq_poll on win32 fails with EINVAL 2010-02-10 10:42:54 +01:00
Martin Sustrik
4c870ede7f ZMQII-57: Shutdown OpenPGM library 2010-02-09 09:08:37 +01:00
unknown
b9b0124d55 ZMQII-34: ensure that poll won't return POLLIN event when the message will be filtered out anyway (Win32) 2010-01-14 15:50:12 +01:00
Martin Sustrik
067ba3b9f7 ZMQII-34: ensure that poll won't return POLLIN event when the message will be filtered out anyway (POSIX) 2010-01-13 19:21:23 +01:00
Martin Sustrik
bd07baf028 ZMQII-33: zmq_poll may exceed timeout if signal interrupts the waiting 2010-01-09 22:24:59 +01:00
Martin Sustrik
e806615dd1 ZMQII-31: memory leak in zmq_poll (on timeout) 2010-01-08 15:44:51 +01:00
Martin Sustrik
ddf5f75549 zmq.cpp build probelm on non-linux platforms fixed 2010-01-07 14:44:43 +01:00
Martin Sustrik
4f6baf4dde Copyrights transferred from FastMQ to iMatix 2010-01-05 08:29:35 +01:00
Martin Sustrik
f2b235db16 ZMQII-29: Add timeout to zmq_poll function 2010-01-04 15:46:20 +01:00
Martin Sustrik
ab5abf6c7e hint parameter added to zmq_free function 2009-12-16 15:08:37 +01:00
Martin Sustrik
8aa0908635 all news converted to nothrow variant 2009-12-15 23:49:55 +01:00
unknown
d4fdc26efc zmq_poll implemented on Win32 platform 2009-12-10 16:46:22 +01:00
Martin Sustrik
0e9ab2e8a3 inproc transport - initial commit 2009-11-21 20:59:55 +01:00
unknown
49a9ef5fcb windows error handling improved 2009-10-01 13:48:04 +02:00
Martin Sustrik
cc631c4c66 ZMQII-18: Implement I/O multiplexing (first approximation) 2009-10-01 10:56:17 +02:00