Commit Graph

1613 Commits

Author SHA1 Message Date
Staffan Gimåker
2cd04c54df Compact the trie/mtrie node tables where possible, to reduce memory usage.
Signed-off-by: Staffan Gimåker <staffan@spotify.com>
2012-02-16 15:56:19 +01:00
Staffan Gimåker
e18f9da012 Drop subscription messages when reaching the SNDHWM rather than asserting.
This matches the behaviour of zmq_setsockopt(ZMQ_SUBSCRIBE, ...), which also
silently drops subscription messages if the SNDHWM is reached.

Signed-off-by: Staffan Gimåker <staffan@spotify.com>
2012-02-16 14:49:47 +01:00
Staffan Gimåker
b9fb48f47b Resolve addresses in the calling thread on connect.
This allows us to actually report an error to the caller on resolve
failure, rather than asserting later on in the io thread.

Signed-off-by: Staffan Gimåker <staffan@spotify.com>
2012-02-16 14:42:55 +01:00
Pieter Hintjens
d092f2615c Renamed peek/poke to get/set 2012-02-15 19:28:29 -06:00
Pieter Hintjens
dcc1725a90 Renamed zmq_getmsgopt to zmq_msg_peek
* Added zmq_msg_poke for orthogonality
* Added zmq_msg_more for simplicity
* Fixed up man pages and test program
2012-02-15 18:44:28 -06:00
Pieter Hintjens
b3d7b29280 Renamed scatter/gather methods, cleaned up source 2012-02-15 16:47:24 -06:00
Pieter Hintjens
fb4748f257 Added zmq_msg_send/recv functions 2012-02-15 15:37:35 -06:00
Pieter Hintjens
6b2ec366b1 Changed return type of zmq_msg_size to ssize_t to allow error return 2012-02-15 15:17:01 -06:00
Pieter Hintjens
d38951db87 Return EFAULT if required arguments are null 2012-02-15 13:03:40 -06:00
Chuck Remes
b2e2fa622d Merge pull request #244 from pieterh/master
Cleanups to man pages
2012-02-15 08:54:27 -08:00
Pieter Hintjens
0c4a19c408 Deprecated XREQ/XREP 2012-02-15 10:48:31 -06:00
Pieter Hintjens
5f6b95f4a2 Fixed footers to refer to man page, not all docs 2012-02-15 10:39:18 -06:00
Pieter Hintjens
c85ecfc066 Cleaned up description of multi-part messages 2012-02-15 10:39:18 -06:00
Pieter Hintjens
636de46fe1 Removed section on devices, added new methods 2012-02-15 10:39:18 -06:00
Pieter Hintjens
086c059430 Ported numerous fixes from 2.1 man page 2012-02-15 10:39:18 -06:00
Chuck Remes
9bc0e10818 Merge pull request #243 from pieterh/master
Fixed error in documentation build
2012-02-15 07:33:03 -08:00
Pieter Hintjens
bd4f703264 Ignored generated files 2012-02-15 09:27:42 -06:00
Pieter Hintjens
2000d44109 Fixed syntax error in zmq_getsockopt man page 2012-02-15 09:26:39 -06:00
Pieter Hintjens
a50a8aa364 Revert "more checks for parameters of API functions"
This reverts commit e646ce43c1.
2012-02-14 18:43:33 -06:00
Pieter Hintjens
afe8cd503f Revert "fix warn unused"
- anonymous contributor

This reverts commit 7b7d404269.
2012-02-14 18:43:33 -06:00
Pieter Hintjens
b2e9347372 Merge pull request #238 from ianbarber/master
Wildcard support in TCP and IPC addresses
2012-02-14 16:39:32 -08:00
Ian Barber
cc10c00193 Updating docs with new sockopt 2012-02-14 23:14:33 +00:00
Ian Barber
b6c97230ed Merge branch 'master' of https://github.com/zeromq/libzmq 2012-02-14 23:10:15 +00:00
Ian Barber
b5d3373905 Moving to std::string in options 2012-02-14 23:10:06 +00:00
Pieter Hintjens
a908ccbf35 Merge pull request #241 from skaller/master
provide type safe sockets and contexts
2012-02-13 08:55:58 -08:00
Pieter Hintjens
48423c9e40 Merge pull request #242 from niXman/master
more checks for parameters of API functions
2012-02-13 08:35:59 -08:00
niXman
e646ce43c1 more checks for parameters of API functions 2012-02-12 20:10:52 +04:00
skaller
4807935605 Implement type safe sockets and contexts. 2012-02-12 10:15:51 +11:00
Ian Barber
770f84331f Allowing value 0, and moving code to get_address functions based on feedback 2012-02-11 15:09:03 +00:00
Ian Barber
91bf4944da Merge branch 'master' of https://github.com/zeromq/libzmq 2012-02-11 15:08:23 +00:00
Chuck Remes
256fa5d2b8 Merge pull request #240 from niXman/master
fix warn unused variables
2012-02-11 06:10:50 -08:00
niXman
7b7d404269 fix warn unused 2012-02-10 13:39:34 +04:00
Pieter Hintjens
40052c1251 Merge pull request #239 from skaller/master
Provide scatter/gather array I/O
2012-02-10 00:20:56 -08:00
Ian Barber
7fa14f3823 Merge branch 'master' of https://github.com/zeromq/libzmq 2012-02-08 22:06:50 +00:00
Ian Barber
7b32c9cb51 Adding ZMQ_LAST_ENDPOINT for wildcard support on TCP and IPC sockets 2012-02-08 22:06:46 +00:00
skaller
c3f7543ebe Fix uio support.
We have to use an incomplete type in the interface.
The definition of iovec is only in the implementation.
This appears to following existing practice in 0MQ.
It seems a bit flakey that zmq.h is not included in zmq.cpp,
which is normal practice to ensure the implementation matches
the specified interface. YMMV. I follow 0MQ style.
2012-02-08 13:15:47 +11:00
skaller
970a005399 Provide interface.
Also move iovec definition from implementation to interface.
Not clear to me at present if an incomplete type should
be used to avoid gratuitously including <sys/uio.h> in
the interface. The interface can't be used with this include.
2012-02-08 12:58:35 +11:00
skaller
383a49dadf Implement zmq_recvmmsg. 2012-02-08 11:45:36 +11:00
skaller
531835bba8 Implement zmq_sendv.
Posix style send multiple messages using scatter/gather array.
2012-02-08 03:20:25 +11:00
skaller
f59fff7bf2 Add check for sys/uio.h to configure script.
sys/uio.h contains the XSI vector I/O data structure.
2012-02-08 02:47:51 +11:00
Pieter Hintjens
21571cf085 Merge pull request #237 from skaller/master
Fix comments to conform to style guide.
2012-02-04 02:47:10 -08:00
skaller
81662d70be Add a test for thread safe sockets. 2012-02-04 15:13:36 +11:00
skaller
759b2e01fd Fix comments to conform to style guide. 2012-02-04 12:34:06 +11:00
Pieter Hintjens
9dab56c1df Merge pull request #235 from skaller/master
Thread Safe Sockets.
2012-02-03 12:40:05 -08:00
Pieter Hintjens
cbf6126b08 Merge pull request #234 from ianbarber/master
Semicolon missing
2012-02-03 12:39:47 -08:00
Pieter Hintjens
935f17488a Merge pull request #236 from danielnorberg/master
add missing semicolon
2012-02-03 12:39:11 -08:00
Daniel Norberg
67fd4c9a2c add missing semicolon 2012-02-03 17:28:45 +01:00
skaller
520ad3c2d7 Set and arrange propagation of thread safe sockets flag.
We use a distinct context initialisation function to specify
all sockets derived therefrom will be thread safe.

However the inheritance is done exclusively in the C interface.
This is not really correct, but it is chosen to minimise
interference with the existing C++ code, including any
construct or other calls within the C++ code base.
Semantically the C++ code should be unchanged,
physically some data structures and extra methods are
provided by they're only used from the C binding.
2012-02-04 02:17:35 +11:00
skaller
988efbc73a Thread Safe Sockets.
1. Reorganise C API socket functions to eliminate bad practice
of public functions calling other public functions. This should
be done for msg's too but hasn't been in this patch.

2. Reorganise code in C API socket functions so that the
socket is cast on one line, the C++ function called on
the next with the result retained, then the result is returned.

This makes the code much simpler to read and also allows
pre- and post- call hooks to be inserted easily.

3. Insert pre- and post- call hooks which set and release
a mutex iff the thread_safe flag is on.

4. Add the thread_safe_flag to base_socket_t initialised to
false to preserve existing semantics. Add an accessor for
the flag, add a mutex, and add lock and unlock functions.

Note: as yet no code to actually set the flag.
2012-02-04 01:41:09 +11:00
skaller
4dd6ce0639 Add mission ; character 2012-02-04 00:10:01 +11:00