Message atomicity problem solved in PUB socket

When new peer connects to a PUB socket while it is in the middle
of sending of multi-part messages, it gets just the remaining
part of the message, i.e. message atomicity is broken.

This patch drops the tail part of the message and starts sending
to the peer only when new message is started.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Message atomicity bug in load-balancer fixed

If the peer getting the message have disconnected in the middle
of multiplart message, the remaining part of the message went
to a different peer. This patch fixes the issue.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Version bumped to 3.0.0

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Obsolete constants ZMQ_UPSTREAM and ZMQ_DOWNSTREAM removed

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Obsolete note removed from zmq_poll(3) manpage

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Timeout in zmq_poll is in milliseconds

The old timeout in microsecond haven't been compliant with
POSIX and was impractical at the same time.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
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>
Pre-compiled devices removed

Along with the devices, xmlParser which is no longer needed
is removed.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
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>
Auto-tests modified to use C API instead of C++ binding

As a side effect, broker HWM test was fixed.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
C++ binding removed from the core

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
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>
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>
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>
ZMQ_SNDBUF and ZMQ_RCVBUF type changed to int

This mimics POSIX specification.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
ZMQ_RCVMORE type changed to int

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
ZMQ_EVENTS type changed to int

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
ZMQ_RATE and ZMQ_RECOVERY_IVL types cahnged to int

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
ZMQ_HWM type changed to int

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
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>