Commit Graph

134 Commits

Author SHA1 Message Date
Luca Boccassi
52c4a74be2 Merge pull request #98 from laplaceyang/pr_iterator
add iterator for msgs access of mulitpart_t
2016-12-08 15:07:15 +01:00
laplaceyang
5cd848273a add iterator 2016-12-08 22:03:13 +08:00
Luca Boccassi
e2c1108672 Merge pull request #99 from laplaceyang/reduce_copy
reduce copy when send mem block
2016-12-08 14:08:19 +01:00
Luca Boccassi
55c2eea1a7 Merge pull request #97 from laplaceyang/pr_direct_access
addd operator[] and at function for direct access msgs
2016-12-08 14:08:12 +01:00
laplaceyang
404b97212b reduce copy 2016-12-08 20:58:38 +08:00
laplaceyang
3483416e5a addd operator[] and at function 2016-12-08 20:46:52 +08:00
Luca Boccassi
28c7c8cfe7 Merge pull request #96 from laplaceyang/bug_runtime_t
lack of head file
2016-12-08 10:45:22 +01:00
laplaceyang
72f53c8fdd lack of head file 2016-12-08 11:03:25 +08:00
Luca Boccassi
8b52a6ffac Merge pull request #92 from 0mp/master
Fix message_t::gets.
2016-11-15 23:47:20 +01:00
Mateusz Piotrowski
1c8da7cd8d Fix message_t::gets.
- Add a missing underscore.
 - Remove const as msg is passed by reference.
2016-11-15 23:43:15 +01:00
Luca Boccassi
5fcd5cf29d Merge pull request #90 from 0mp/master
Create a binding for zmq_msg_gets.
2016-11-15 23:00:14 +01:00
Mateusz Piotrowski
570ff93ea9 Create a binding for zmq_msg_gets.
Additionally, I've changed some tabs to spaces and remove trailing
spaces.
2016-11-15 22:07:00 +01:00
Constantin Rack
4648ebc964 Merge pull request #89 from phlptp/master
Visual Studio 2015 definitions
2016-11-06 20:16:23 +01:00
Philip Top
95ce4f2bc2 Update zmq.hpp
add const to what function of error_t
2016-11-06 07:38:16 -08:00
Philip Top
8d64ceccb3 Merge remote-tracking branch 'remotes/origin/master' 2016-11-06 07:18:32 -08:00
Luca Boccassi
e9b28db670 Merge pull request #87 from rolftimmermans/exception-fix
Constructor for std::exception does not take string argument.
2016-10-28 13:57:59 +01:00
Rolf Timmermans
e138b74cde Constructor for std::exception does not take string argument. 2016-10-28 14:53:22 +02:00
Luca Boccassi
c5611d6aff Merge pull request #86 from K0n63n/master
Add comments, optimize some functions, add static asserts
2016-10-23 00:21:59 +01:00
Harald Nøkland
da1b5e3e23 Add comments, optimize some functions, add static asserts
Add comments to all functions. Optimize move constructor and move assigment operator, remove size check inside pop/remove/peek. Static assert in pushtyp/addtyp/poptyp in order to avoid pitfall with std::string (pushstr/addstr/popstr should be used for that). Add sanity check for poptyp, size of message must match desired type.
2016-10-23 00:27:12 +02:00
Philip Top
a3f166e5cd added conditional C++11 definitions to match visual studio 2015 2016-10-22 06:24:35 -07:00
Constantin Rack
0791496622 Merge pull request #82 from staticfloat/master
Enable passing flags in to `send()` and `recv()`
2016-10-22 09:27:47 +02:00
Ben Gray
7faa9b0618 Merge pull request #85 from serge-medvedev/context-close-destruct-assert-issue
Failing assertion in dtor of context_t
2016-09-19 14:27:15 +01:00
Serge Medvedev
8214a500d9 Assertion in dtor of context_t doesn't fail if close method has already been called 2016-09-19 10:27:52 +03:00
Elliot Saba
93af23a58e Enable passing flags in to send() and recv() 2016-08-14 16:46:43 -07:00
Constantin Rack
92d2af6def Merge pull request #81 from yorickdewid/patch-1
Remove explicit cast on void pointer operator
2016-07-18 21:03:11 +02:00
Yorick de Wid
bd288a55c1 Remove explicit cast on void pointer operator 2016-07-18 16:51:24 +02:00
Constantin Rack
0db7521a64 Merge pull request #75 from K0n63n/master
Class for multipart messaging
2016-04-06 20:41:32 +02:00
Harald Nøkland
e7c2093581 Class for multipart messaging
This class handles multipart messaging. It is the C++ equivalent of zmsg.h, which is part of CZMQ (the high-level C binding). Furthermore, it is a major improvement compared to zmsg.hpp, which is part of the examples in the ØMQ Guide. Unnecessary copying is avoided by using move semantics to efficiently add/remove parts.
2016-04-06 14:20:10 +02:00
Constantin Rack
68a7b09cfc Merge pull request #70 from raulcf/master
Updating zmq_ctx_shutdown to zmq_ctx_destroy which is imported in zmq.h
2016-01-20 00:11:25 +01:00
raulcf
014628cb34 Updating zmq_ctx_shutdown to zmq_ctx_ctx which is imported in zmq.h 2016-01-19 17:39:26 -05:00
Pieter Hintjens
7f7c83411d Merge pull request #67 from K0n63n/master
New fill constructor for message_t
2015-12-03 09:15:21 +01:00
Harald Nøkland
fdd9d2d5f0 New fill constructor for message_t
New fill constructor: message_t(const void *data, size_t size). Constructs a new message of the given size and copies the data to the message body. In addition a new rebuild() function that does the same for an already constructed object
2015-12-03 08:43:24 +01:00
Constantin Rack
c86eb9ed4d Merge pull request #66 from K0n63n/master 2015-12-03 08:38:41 +01:00
Harald Nøkland
18b5870caa Fix warning 4996 in msvc debug build
When making a debug build with msvc, the range constructor of message_t caused warning 4996: 'std::_Copy_impl': Function call with parameters that may be unsafe. It is actually safe to do what's done in the constructor, so the workaround is to mimic what std::copy does, whitout the range check.
2015-12-03 08:23:39 +01:00
Pieter Hintjens
ac1c3c3bd8 Merge pull request #65 from K0n63n/master
Correction to pull request #56
2015-11-30 17:15:25 +01:00
Harald Nøkland
308239d758 Correction to pull request #56
A better/nicer solution to fix the type mismatch warnings (size_t to int). Working with size_t as long as possible and doing the static_cast right before calling the zmq_poll() function of libzmq
2015-11-30 16:55:51 +01:00
Pieter Hintjens
df5ce1782c Merge pull request #64 from K0n63n/master
Fix two issues in message_t's range constructor
2015-11-30 15:52:06 +01:00
Harald Nøkland
4815c80aed Fix two issues in message_t's range constructor
Fix the following two problems in message_t's range constructor: (1) The range constructor passed the wrong size for iterator-types larger than one byte, (2) The range constructor didn't compile for const-iterators.
2015-11-30 15:36:42 +01:00
Constantin Rack
2e22e3fc45 Merge pull request #62 from gdfast/patch-2
Make getsockopt() functions const
2015-11-19 20:05:58 +01:00
gdfast
c1e8ac0f19 Make getsockopt() functions const
Make the socket_t::getsockopt() functions (which wrap zmq_getsockopt() ) const because they should only access and not modify socket state.
2015-11-19 12:37:07 -05:00
Constantin Rack
bad35bdbfe Merge pull request #59 from dquam/patch-1
Fix usage of zmq_msg_recv and zmq_recvmsg
2015-11-14 09:27:49 +01:00
dquam
baeaebc1cf Fix usage of zmq_msg_recv and zmq_recvmsg
The zmq_msg_recv() function takes the message, socket, and flags while the zmq_recvmsg() function takes the socket, message. This commit addresses that difference.
2015-11-12 15:35:16 -06:00
Constantin Rack
7c3d374ff8 Merge pull request #57 from gdfast/patch-1
Avoid using deprecated function zmq_recvmsg
2015-11-10 21:20:22 +01:00
Constantin Rack
fadb37e4a7 Merge pull request #52 from revaultch/master
Fixes assertion error: src/mutex.hpp:123
2015-11-10 21:20:11 +01:00
gdfast
5989203558 Avoid using deprecated function zmq_recvmsg
The zmq_recvmsg() function has been replaced by zmq_msg_recv() since version 3.2.0, and has since been marked as deprecated.
See: https://raw.githubusercontent.com/zeromq/zeromq3-x/master/NEWS
Replace our uses of the old function (which was in monitor_t::monitor()) with the more modern function call. Support backwards compatibility with a #DEFINE macro for versions of zmq preceeding 3.2.0
2015-11-10 15:14:21 -05:00
Pieter Hintjens
4d79066be3 Merge pull request #56 from cmcmurrough/master
fixed type mismatch warnings (size_t to int)
2015-11-06 02:05:22 +01:00
Christopher D. McMurrough
0feecde95c fixed type mismatch warnings (size_t to int)
MSVC complains about conversion of size_t to int.  The size_t typedef is
defined as an unsigned __int64 on Win64, which triggers the warning. Two
such instances were fixed with static_cast<int>(size_t)
2015-11-05 17:21:24 -06:00
Pieter Hintjens
a4459abdd1 Merge pull request #55 from banburybill/master
Extend C++11 guard to cover remaining use of std::vector data().
2015-11-01 17:34:17 +01:00
Jim Hague
87b12c806a Extend C++11 guard to cover remaining use of std::vector data().
Now compiles without error with a pre-C++11 compiler (g++-3.3).

Fixes #53
Please enter the commit message for your changes. Lines starting
2015-11-01 16:08:56 +00:00
Urs Keller
971092e472 Fixes assertion error, when destroing ctx while creating a socket from a different thread: ./src/mutex.hpp:123 2015-10-02 16:32:36 +02:00