summaryrefslogtreecommitdiff
path: root/src/core/message.c
Commit message (Collapse)AuthorAge
* fixes #1004 Warning found by clang --analyzeGarrett D'Amore2019-11-11
| | | | | It's possible for an empty chunk to have a NULL data pointer. Even when copying zero bytes, this makes clang somewhat unhappy.
* nng_msg_dup correctly duplicates pipe (mentioned in #862)Jake Woltersdorf2019-03-12
|
* remove redundant zero memory operationsQXSoftware2018-10-12
|
* fix function "int nni_msg_alloc(nni_msg **mp, size_t sz)" allocates the ↵QXSoftware2018-10-02
| | | | underlying buffer twice under some circumstance, say, sz = 1024 or 2048
* 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.
* fixes #605 NNI_ALLOC_STRUCT/NNI_ALLOC_STRUCTS should zero memoryGarrett D'Amore2018-07-24
|
* fixes #396 illumos doesn't build (missing NNG_PLATFORM_POSIX ON)Garrett D'Amore2018-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes #397 Need to cast zoneid fixes #395 sun is predefined on illumos/Solaris fixes #394 alloca needs to #include <alloca.h> fixes #399 Cannot use SVR4.2 specific msghdr fixes #402 getpeerucred needs a NULL initialized ucred fixes #403 syntax error in posix_tcp - attempt to return void fixes #407 illumos getegid wrong fixes #406 nni_idhash_count is dead code fixes #404 idhash typedef redeclared fixes #405 warning: newline not last character in file This is basically a slew of related bug fixes required to make this work on illumos. Note that the fixes are not "complete", because more work is required to support port events given that epoll is busted on illumos. We also fixed a bunch of things that aren't actually "bugs" per se, but really just warnings. Silencing them makes things better for everyone. Apparently not all compilers are equally happy with redundant (but otherwise identical) typedefs; we use structs in some places instead of shorter type names to silence these complaints. Note that IPC permissions (the mode bits on the socket vnode) are not validated on SunOS systems. This change includes documentation to reflect that.
* fix a number of cppcheck complaints (not all)Garrett D'Amore2018-04-24
|
* fixes #2 Websocket transportGarrett D'Amore2017-12-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a rather large changeset -- it fundamentally adds websocket transport, but as part of this changeset we added a generic framework for both HTTP and websocket. We also made some supporting changes to the core, such as changing the way timeouts work for AIOs and adding additional state keeping for AIOs, and adding a common framework for deferred finalization (to avoid certain kinds of circular deadlocks during resource cleanup). We also invented a new initialization framework so that we can avoid wiring in knowledge about them into the master initialization framework. The HTTP framework is not yet complete, but it is good enough for simple static serving and building additional services on top of -- including websocket. We expect both websocket and HTTP support to evolve considerably, and so these are not part of the public API yet. Property support for the websocket transport (in particular address properties) is still missing, as is support for TLS. The websocket transport here is a bit more robust than the original nanomsg implementation, as it supports multiple sockets listening at the same port sharing the same HTTP server instance, discriminating between them based on URI (and possibly the virtual host). Websocket is enabled by default at present, and work to conditionalize HTTP and websocket further (to minimize bloat) is still pending.
* Don't compile in message dumping by default.Garrett D'Amore2017-08-12
|
* 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
|
* Start of event framework.Garrett D'Amore2017-01-16
| | | | | | | | | | This compiles correctly, but doesn't actually deliver events yet. As part of this, I've made most of the initializables in nng safe to tear-down if uninitialized (or set to zero e.g. via calloc). This makes it loads easier to write the teardown on error code, since I can deinit everything, without worrying about which things have been initialized and which have not.
* Various complaints found in AppVeyor build.Garrett D'Amore2017-01-16
|
* 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
|
* Message allocation fixed. Comparison was backwards.Garrett D'Amore2016-12-27
|
* 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.
* Uncrustify fixes.Garrett D'Amore2016-12-23
|
* C99 comment style.Garrett D'Amore2016-12-22
|
* 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
|
* New inproc transport.Garrett D'Amore2016-12-12
| | | | Lots of supporting changes.
* More message API.Garrett D'Amore2016-12-11
|
* Message allocation, deallocation, reallocation.Garrett D'Amore2016-12-10
|
* Initial commit. This is not going to be useful to you for anything.Garrett D'Amore2016-12-10