| Commit message (Collapse) | Author | Age |
| |
|
|
| |
This is simpler and faster.
|
| |
|
|
|
| |
This is going to be needed for MQTT options, and it has to deal
with multiple user options (which may be repeated), etc.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
| |
This uses a maximum 64-byte header and should avoid allocations and
cache misses, leading to a small performance boost overall.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
code with uncrustify. (Minor adjustments.) No more arguments!
|
| |
|