aboutsummaryrefslogtreecommitdiff
path: root/src/core/message.h
Commit message (Collapse)AuthorAge
* Various header file fixes... also fix compilation errors when HTTP is disabled.v2.0.0-alpha.6Garrett D'Amore2025-10-05
| | | | | | Also, some instances nni_aio are changed to nng_aio. We think we want to harmonize some of these types going forward as it will reduce the need to include headers hopefully letting us get away with just "defs.h" in more places.
* Liberally apply some UWYI (use what you include) to header filesGarrett D'Amore2025-01-05
|
* msg: add sockaddr to message structureGarrett D'Amore2024-10-05
| | | | | This is expected to be useful for new transports where we need the sock address to properly reply (think UDP with multicast).
* Add & document msg_capacity, msg_reserve (#1458)Evan Balster2021-07-06
| | | | | | | * Add & document msg_capacity, msg_reserve * reserve/capacity code style * Documentation references to reserve/capacity
* fixes #808 Very slow PAIR performance compared to nanomsgGarrett D'Amore2021-01-18
| | | | | | This is only the pair v1 protocol. Pair v0 and polyamorous mode still have work to do. We probably won't "fix" the performance for poly mode since that's deprecated anyway.
* fixes #1171 message header could be inlined in the message structureGarrett D'Amore2020-02-26
| | | | | This uses a maximum 64-byte header and should avoid allocations and cache misses, leading to a small performance boost overall.
* fixes #1156 Message cloning could help reduce copies a lotGarrett D'Amore2020-01-20
| | | | | | | | | | | | This introduces reference counting on messages to reduce the data copies. This should have a marked improvement when moving large messages through the system, or when publishing to many subscribers. For some transports, when using large messages, the copy time can be the dominant factor. Note that when a message is actually shared, inproc will still perform an extra copy in order to ensure that it can modify the headers. This will unfortunately always be the case with REQ, as the REQ protocol keeps a copy of the original message so it can retry.
* fixes #1145 nng_msg options should be removedGarrett D'Amore2020-01-19
|
* XREQ and others race on TTL.Garrett D'Amore2020-01-11
| | | | | | | | | | The TTL in these cases should have been atomic. To facilitate things we actually introduce an atomic int for convenience. We also introduce a convenience nni_msg_must_append_u32() and nni_msg_header_must_append_u32(), so that we can eliminate some failure tests that cannot ever happen. Combined with a new test for xreq, we have 100% coverage for xreq and more coverage for the other REQ/REP protocols.
* fixes #691 Desire 16 and 64 bit message manipulatorsGarrett D'Amore2018-08-31
| | | | | | We use macros to generate message bodies for each of the various variants, reducing source code size (but not compiled size). The documentation is updated to indicate each of these variants.
* Unify the msg API.Garrett D'Amore2017-08-10
| | | | | | | | | | | | | This makes the operations that work on headers start with nni_msg_header or nng_msg_header. It also renames _trunc to _chop (same strlen as _trim), and renames prepend to insert. We add a shorthand for clearing message content, and make better use of the endian safe 32-bit accessors too. This also fixes a bug in inserting large headers into messages. A test suite for message handling is included.
* Add new PAIR_V1 protocol.Garrett D'Amore2017-08-10
| | | | | | | | | | The PAIR_V1 protocol supports both raw and cooked modes, and has loop prevention included. It also has a polyamorous mode, wherein it allows multiple connections to be established. In polyamorous mode (set by an option), the sender requests a paritcular pipe by setting it on the message. We default to PAIR_V1 now.
* Give up on uncrustify; switch to clang-format.Garrett D'Amore2017-07-10
|
* Message API was awkward.Garrett D'Amore2017-01-06
| | | | | | | The use of a single function to get both size and length actually turned out to be awkward to use; better to have separate functions to get each. While here, disable some of the initialization/fork checks, because it turns out they aren't needed.
* Fixes to enable REQ/REP to operate.Garrett D'Amore2017-01-02
| | | | | | | This uncovered a few problems - inproc was not moving the headers to the body on transmit, and the message chunk allocator had a serious bug leading to memory corruption. I've also added a message dumper, which turns out to be incredibly useful during debugging.
* Use new NNI_ALLOC_STRUCT macro. nni_msg_dup copies options too.Garrett D'Amore2017-01-02
|
* Add new nni_msg_dup() API. (Needed for REQ protocol.)Garrett D'Amore2016-12-28
|
* Change in handling of extended info for messages.Garrett D'Amore2016-12-24
| | | | | | | | Instead of supplying a pipe, and expecting that the info there would be included we use nng_msg_getopt(). This will be enabled by the app asking for extended information by setting an option, we don't copy the data for every app (most won't care). This means we don't have to worry about reference counting the pipe for the life of associated messages.
* Work on endpoints. More C99 & type cleanups.Garrett D'Amore2016-12-22
|
* Uncrustify configuration, and shorter copyright banners, plus reformatGarrett D'Amore2016-12-21
| | | | code with uncrustify. (Minor adjustments.) No more arguments!
* Better separate public vs. private names.Garrett D'Amore2016-12-14