Commit Graph

97 Commits

Author SHA1 Message Date
Martin Sustrik
714d3b288f EAFNOSUPPORT defined on Windows platform
Windows headers don't defined this error.
This patch defines it if not already defined.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-15 20:39:48 +02:00
Steven McCoy
784041f5b9 ZMQ_IPV4ONLY option added
At this point option exists, is documented and can be set,
however, it has no effect.

Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-08 12:10:31 +02:00
Martin Sustrik
a1e09facb2 ROUTER socket reports error when message cannot be routed
Till now, message was silently dropped if it was sent to
a non-existent peer. Now, ECANTROUTE error is returned.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-21 18:54:27 +02:00
Martin Sustrik
72a793f78a ZMQ_GENERIC renamed to ZMQ_ROUTER
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-21 18:43:50 +02:00
Martin Sustrik
bf78e230ad GENERIC socket type and COMMAND flag added
GENERIC allows to use 0MQ as a dumb networking framework.
It provides user with connect/disconnect notifications.
Also, each inbound message is labeled by ID of the connection
it originated from. Outbound messages should be labeled by
the ID of the connection to send them to.

To distinguish connect/disconnect notifications from common
messages, COMMAND flag was introduced.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-17 23:31:29 +02:00
Martin Sustrik
c8e8f2a24c ZMQ_IDENTITY socket option removed
This patch simplifies the whole codebase significantly,
including dropping depedency on libuuid.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-15 11:24:33 +02:00
Martin Sustrik
e4f98d1e10 ROUTER and DEALER sockets removed
To be replaced by new generic socket type

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-15 08:16:40 +02:00
Martin Sustrik
73630de98a Version number bumped to 4.0.0
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-15 08:11:42 +02:00
Martin Sustrik
d7adc3f19a ZMQ_FILTER option removed
The filtering is now done depending on the socket type. SUB socket
filters the messages (end-to-end filtering) while XSUB relies
on upstream nodes to do (imprefect) filtering.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-11 09:57:59 +02:00
Martin Sustrik
a28928fe37 Introduce ZMQ_ROUTER and ZMQ_DEALER sockets
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-20 13:36:18 +02:00
Martin Sustrik
ab99975ad4 LABEL flag added to the wire format
So far there was no distinction between message parts used by 0MQ
and message parts used by user. Now, the message parts used by 0MQ
are marked as 'LABEL'.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-20 11:33:54 +02:00
Martin Sustrik
4b60023b96 Merge branch 'master' of github.com:zeromq/libzmq 2011-06-19 09:15:06 +02:00
Steven McCoy
9b795de4af Refactor Windows versioning and WinSock usage.Signed-off-by: Steven McCoy <steven.mccoy@miru.hk> 2011-06-18 20:44:03 +02:00
Fabien Ninoles
d7923f08ca Add sockopt ZMQ_RCVTIMEO/ZMQ_SNDTIMEO.
- 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-17 12:22:02 +02:00
Martin Sustrik
ff93f54653 ZMQ_FILTER socket option added
This option is a performance tweak. In devices XSUB socket filters
the messages just to send them to XPUB socket which filters them
once more. Setting ZMQ_FILTER option to 0 allows to switch the
filtering in XSUB socket off.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-12 15:24:08 +02:00
Martin Sustrik
5d0cffc52f ZMQ_MULTICAST_HOPS socket option added
Sets the time-to-live field in every multicast packet sent from the socket.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-15 18:25:43 +02:00
Martin Sustrik
e0246e32d7 Message-related functionality factored out into msg_t class.
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-21 22:27:48 +02:00
Martin Sustrik
581697695a Message validity is checked in the runtime
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-19 08:08:15 +02:00
Martin Sustrik
0839cceac9 Missing ENOTSOCK added on Win32
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-09 09:46:59 +02:00
Martin Sustrik
abb184a051 ZMQ_NOBLOCK renamed ZMQ_DONTWAIT
Done because of POSIX compliance

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-26 10:38:40 +01:00
Martin Sustrik
bc4a1ce334 ZMQ_HWM split into ZMQ_SNDHWM and ZMQ_RCVHWM
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-24 16:47:33 +01:00
Martin Sustrik
a2252de2bc ZMQ_RECOVERY_IVL and ZMQ_RECOVERY_IVL_MSEC reconciled
There's only one option now -- ZMQ_RECOVRY_IVL --
and it's measured in milliseconds.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 14:36:40 +01:00
Martin Sustrik
8463b4d55e SWAP functionality removed
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-24 12:27:06 +01:00
Martin Sustrik
fb27a000d9 send/recv was changed to send/recv/sendmsg/recvmsg
send/recv now complies with POSIX by using raw buffers instead
of message objects and by returning number of bytes sent/recvd
instead of 0/-1.

The return value is changed accordingly for sendmsg and recvmsg.

Note that related man pages will be fixed in a separate patch.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 11:53:55 +01:00
Martin Sustrik
d4e83d2601 C++ binding removed from the core
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 10:18:06 +01:00
Martin Sustrik
941be8d217 zmq_device removed
Devices are basically applications on top of 0MQ stack. They
should reside in separate libraties.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-23 17:44:16 +01:00
Martin Sustrik
b45b68ae4a ZMQ_MCAST_LOOP removed
Multicast loopback is not a real multicast, rather a kernel-space
simulation. Moreover, it tends to be rather unreliable and lossy.
Removing the option will force users to use transports better
suited for the job, such as inproc or ipc.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-23 17:01:39 +01:00
Martin Sustrik
34d7854199 Obsolete constants ZMQ_UPSTREAM and ZMQ_DOWNSTREAM removed
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-23 15:26:47 +01:00
Martin Sustrik
dee5f650dd Version bumped to 3.0.0
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-23 15:24:18 +01:00
Guido Goldstein
d0c8edde35 Added missing close method w/ check if socket is already closed.
Signed-off-by: Guido Goldstein <github@a-nugget.de>
2011-03-12 17:16:27 +01:00
Martin Sustrik
18b9ebea32 The copyrights in file headers updated.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-02 16:30:40 +01:00
Martin Sustrik
5fcef1cac4 ZMQ_MAXMSGSIZE option added
The new option allows user to guard against peers sending
oversized messages. Connection to peer sending oversized message
is dropped.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-02 09:00:36 +01:00
Martin Sustrik
820fec7f28 Version bumped to 2.2.0
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-22 21:43:52 +01:00
Thijs Terlouw
042e34a5d9 operator void* () added to context_t.
Makes it possible to share the context from C++ to C.

Signed-off-by: Thijs Terlouw <thijsterlouw@gmail.com>
2011-02-04 16:44:13 +01:00
Thijs Terlouw
f7f1dfc86d ZMQ_RECONNECT_IVL_MAX socket option added
It allows for exponential back-off strategy when reconnecting.

Signed-off-by: Thijs Terlouw <thijsterlouw@gmail.com>
2011-01-26 07:01:06 +01:00
Martin Sustrik
725ebce13c Version bumped to 2.1.1
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-01-11 21:12:51 +01:00
Min Ragan-Kelley
08cd2ce05d resolve "function declaration isn't a prototype"
change two declarations in headers to form f(void); instead of f();
which eliminates the warnings when compiling against zeromq

Signed-off-by: MinRK <benjaminrk@gmail.com>
2011-01-06 08:42:57 +01:00
Bob Beaty
fcfad5682e Added Recovery Interval in Milliseconds
For very high-speed message systems, the memory used for recovery can get to
be very large. The corrent limitation on that reduction is the ZMQ_RECOVERY_IVL
of 1 sec. I added in an additional option ZMQ_RECOVERY_IVL_MSEC, which is the
Recovery Interval in milliseconds. If used, this will override the previous
one, and allow you to set a sub-second recovery interval. If not set, the
default behavior is to use ZMQ_RECOVERY_IVL.

Signed-off-by: Bob Beaty <rbeaty@peak6.com>
2010-12-09 21:42:58 +01:00
Martin Sustrik
c80e7b80cc XPUB and XSUB socket types added.
These are just placeholders. At the moment XPUB behaves th same
as PUB and XSUB as SUB.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-12-04 23:14:38 +01:00
Mikko Koppanen
5bb0a339be Prefix variables with "ac_zmq_"
- Added a macro for checking clang compiler
 - Moved basic compiler checks to a macro
 - Added a macro for checking if compiler supports a flag
 - Added --enable-debug flag
 - Added a macro for running normal autoconf check with compiler flags
 - Added a macro for checking for verbose flag for different compilers (-Wall)
 - Added a macro for turning on strict standards compliance
 - Added a macro for turning warnings to errors
 - Added a macro for checking if compiler supports given pragma
 - Most of the flags now go through checks if the compilers supports them
   rather than enumerating different compilers
 - Added DSO symbol visibility for sun compiler
 - Enabled verbose mode for sun compiler
 - Fixed build for ICC 12.x by adding -wd279 to size_t checks
 - Removed pkg-config checks as those don't seem to be used anywhere

Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2010-12-01 10:33:07 +01:00
Martin Lucina
c9584096e0 Control symbol exports using -fvisibility
On systems using GCC 4.0 or newer which support symbol visibility in shared
libraries, use -fvisibility=hidden and only export explict API functions
defined in zmq.cpp. We do not enable -fvisibility on MinGW since this uses a
separate mechanism (__declspec).

Signed-off-by: Martin Lucina <mato@kotelna.sk>
2010-11-25 17:12:31 +01:00
Martin Sustrik
b358df9fff Name of "GNU Lesser Public License" corrected.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-30 15:08:28 +02:00
Peter Bourgon
9384faf7e5 Add function to zmq::error_t to access errnum
Signed-off-by: Peter Bourgon <peter.bourgon@gmail.com>
2010-10-29 08:16:59 +02:00
Burak Arslan
3eb935ef6e switch to c++-specific headers
Signed-off-by: Burak Arslan <burak-github@arskom.com.tr>
2010-10-28 08:41:28 +02:00
Martin Sustrik
a780833683 ZMQ_BACKLOG socket option added.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-17 10:23:58 +02:00
Martin Sustrik
e8e2944f45 ZMQ_RECONNECT_IVL socket options added.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-17 09:54:12 +02:00
Martin Sustrik
0a03e86e95 ZMQ_LINGER socket option added.
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-16 10:53:29 +02:00
Martin Sustrik
eeb8e7c8be Merge branch 'maint'
* maint:
  Makefile.am: Add missing files to distribution, improve maintainer-clean
  configure.in: Extract API version from zmq.h
  Added bin directory to ignore list.

Conflicts:
	configure.in
	include/zmq.h
2010-10-15 17:13:36 +02:00
Martin Lucina
3b3df731e6 configure.in: Extract API version from zmq.h
* Added a version.sh and relevant changes to configure.in to extract the API
  version from zmq.h at the time autogen.sh is run.
* Moved the version macros to be next to zmq_version in zmq.h and improved
  the comments.
* Modified ZMQ_MAKE_VERSION to use (x) instead of plain x when expanding
  macro parameters.

Signed-off-by: Martin Lucina <mato@kotelna.sk>
2010-10-15 16:53:15 +02:00
Martin Sustrik
318cdd1f24 Merge branch 'maint'
* maint:
  Version macros added

Conflicts:
	builds/msvc/platform.hpp

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-09 08:03:58 +02:00