summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2011-05-16Duplicate initialisation of PGM_MULTICAST_HOPS removedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-15ZMQ_MULTICAST_HOPS socket option addedMartin Sustrik
Sets the time-to-live field in every multicast packet sent from the socket. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-15Fixes warning when compiling with MSVC on Win64Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-08Async connect doesn't fail on EWSANETDOWNMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-08Fixed REP assert on missing envelopePieter Hintjens
Signed-off-by: Pieter Hintjens <ph@imatix.com>
2011-05-06urrent pipe pointer in XREP out of range -- fixed.Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-04Accessing an iterator after it is accessed is not valid.Tore Halvorsen
Moving the erase after the access and check agains current_id.
2011-05-03Deallocation functions in zmq.h and msg_t class are consistent.Martin Sustrik
The two functions had different calling conventions (C vs. C++). It is fixed now. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-03Minor patch to keep ICC compiler happyMartin Sustrik
ICC doesn't recognise that assert(false) terminates the program and thus complains that certain functions have no return values. This patch supplies dummy return values to keep the compiler happy. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-02Current inpipe remains unchaged in XREP when other pipe terminatesMartin Sustrik
When an inpipe terminated within XREP, it was erased from the array and thus current_in (which is an index) pointed to a different element in the array. This caused problems when we were in the middle of reading a multipart message. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-02Yet one more fix related to PUB socket and multipart messagesMartin Sustrik
This patch fixes the activation of the pipes, when they pass from passive state directly to active. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-30Message atomicity problem in PUB socket fixed.Martin Sustrik
Reaching the HWM caused breaking message atomicity when the flow was reestablished - initial parts of multipart messages may have been lost. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-30pgm_socket uses binary version of UUIDMartin Sustrik
pgm_socket used textural form of UUID to generate GSIs. The recent patch that removed support for textual UUIDs broke the functionality. This patch fixes the problem. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-29WSAENETUNREACH is a valid networking errorMartin Sustrik
Till now, 0MQ asserted on Windows when connect () returned WSAENETUNREACH. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-29Substantial simplification of uuid_tMartin Sustrik
The string format of UUID is not used in 0MQ. Further on, it turns out that UUIDs have fixed microarchitecture-agnostic binary layout (see RFC4122). Thus, the conversion to string and back to binary can be avoided. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-22Assert during SUB socket termination fixed.Martin Sustrik
Fair queueing algorithm was checking whether the current pipe is not closed in the middle of reading a multipart message. However, this is OK when the socket is closing down. 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-04-19Message validity is checked in the runtimeMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-18OpenPGM compilation error on OSX fixedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-15Error handling for accept on Cygwin fixedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-13Minor cleanup of preprocessor definitions for OpenPGMMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-12Code dealing with messages moved to msg.cppMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-12zmq_utils implementation moved to zmq_utils.cppMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-12OpenPGM now doesn't redefine bool, we can drop the workaroundMartin Sustrik
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-04-04TCP and IPC connection initiation allow for multiple propertiesMartin Sustrik
So far the only property passed on connection initiation was identity. The mechanism was now made extensible. Additional properties are needed to introduce functionality such as checking the peer's socket type, "subports" etc. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-04Issue with error checking on Win32 platform fixedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-04Unreferenced variable removedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-02Fixed memory leak with threads on win32Pieter Hintjens
Signed-off-by: Pieter Hintjens <ph@imatix.com>
2011-03-31Upstream the openpgm build fixes. Add DSO symbol visibility to OpenPGM buildsMikko Koppanen
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2011-03-27Comments improvementMartin Sustrik
related to fairness while reading/writing large messages Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-27zmq_recv() returns size of the message even if it's truncatedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-26Memory leak in zmq_recv fixedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-26ZMQ_NOBLOCK renamed ZMQ_DONTWAITMartin Sustrik
Done because of POSIX compliance 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-24ZMQ_HWM type changed to intMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24ZMQ_RATE and ZMQ_RECOVERY_IVL types cahnged to intMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24ZMQ_EVENTS type changed to intMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24ZMQ_RCVMORE type changed to intMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24ZMQ_SNDBUF and ZMQ_RCVBUF type changed to intMartin Sustrik
This mimics POSIX specification. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24ZMQ_RECOVERY_IVL and ZMQ_RECOVERY_IVL_MSEC reconciledMartin Sustrik
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-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-24send/recv was changed to send/recv/sendmsg/recvmsgMartin Sustrik
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-24C++ binding removed from the coreMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-23zmq_device removedMartin Sustrik
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-23ZMQ_MCAST_LOOP removedMartin Sustrik
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-23Timeout in zmq_poll is in millisecondsMartin Sustrik
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>
2011-03-20Message atomicity bug in load-balancer fixedMartin Sustrik
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>
2011-03-20Message atomicity problem solved in PUB socketMartin Sustrik
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>
2011-03-16Incorrect errno reported from tcp_listener_t::set_addressMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>