summaryrefslogtreecommitdiff
path: root/tests/reqrep.c
Commit message (Collapse)AuthorAge
* fixes #334 Separate context for state machines from socketsGarrett D'Amore2018-04-10
| | | | | | | | | | | | | | | This provides context support for REQ and REP sockets. More discussion around this is in the issue itself. Optionally we would like to extend this to the surveyor pattern. Note that we specifically do not support pollable descriptors for non-default contexts, and the results of using file descriptors for polling (NNG_OPT_SENDFD and NNG_OPT_RECVFD) is undefined. In the future, it might be nice to figure out how to factor in optional use of a message queue for users who want more buffering, but we think there is little need for this with cooked mode.
* fixes #331 replace NNG_OPT_RAW option with constructorGarrett D'Amore2018-04-04
| | | | | | | | | | | | | This makes the raw mode something that is immutable, determined at socket construction. This is an enabling change for the separate context support coming soon. As a result, this is an API breaking change for users of the raw mode option (NNG_OPT_RAW). There aren't many of them out there. Cooked mode is entirely unaffected. There are changes to tests and documentation included.
* fixes #143 Protocols and transports should be "configurable"Garrett D'Amore2017-11-02
| | | | | | | | | | | | | | | | | | | | This makes all the protocols and transports optional. All of them except ZeroTier are enabled by default, but you can now disable them (remove from the build) with cmake options. The test suite is modified so that tests still run as much as they can, but skip over things caused by missing functionality from the library (due to configuration). Further, the constant definitions and prototypes for functions that are specific to transports or protocols are moved into appropriate headers, which should be included directly by applications wishing to use these. We have also added and improved documentation -- all of the transports are documented, and several more man pages for protocols have been added. (Req/Rep and Surveyor are still missing.)
* fixes #137 Remove public access to numeric protocolsGarrett D'Amore2017-10-31
|
* fixes #84 Consider using msec for durationsGarrett D'Amore2017-10-19
| | | | | | There is now a public nng_duration type. We have also updated the zerotier work to work with the signed int64_t's that the latst ZeroTier dev branch is using.
* Refactor option handling APIs.Garrett D'Amore2017-09-27
| | | | | | | | | | | | This makes the APIs use string keys, and largely eliminates the use of integer option IDs altogether. The underlying registration for options is also now a bit richer, letting protcols and transports declare the actual options they use, rather than calling down into each entry point carte blanche and relying on ENOTSUP. This code may not be as fast as the integers was, but it is more intuitive, easier to extend, and is not on any hot code paths. (If you're diddling options on a hot code path you're doing something wrong.)
* Eliminate legacy option settings, provide easier option IDs.Garrett D'Amore2017-08-24
| | | | | | | | | | | | | | | | | | This eliminates all the old #define's or enum values, making all option IDs now totally dynamic, and providing well-known string values for well-behaved applications. We have added tests of some of these options, including lookups, and so forth. We have also fixed a few problems; including at least one crasher bug when the timeouts on reconnect were zero. Protocol specific options are now handled in the protocol. We will be moving the initialization for a few of those well known entities to the protocol startup code, following the PAIRv1 pattern, later. Applications must therefore not depend on the value of the integer IDs, at least until the application has opened a socket of the appropriate type.
* Convert duration to usec.Garrett D'Amore2017-08-14
|
* fixes #63 NNG_FLAG_SYNCH should be the defaultGarrett D'Amore2017-08-14
| | | | | Also enables creating endpoints that are idle (first part of endpoint options API) and shutting down endpoints.
* Convenience option accesor functions.Garrett D'Amore2017-08-12
| | | | | | | | This adds functions that know about option sizes and make them easier to use. While here I added some validation of those, and cleaned up a few tests slightly. Note that we do not need to use the nng_impl.h for most tests. More of them need to be cleaned up.
* fixes #44 open protocol by "name" (symbol) instead numberGarrett D'Amore2017-08-09
| | | | | | | | | | | | | | fixes #38 Make protocols "pluggable", or at least optional This is a breaking change, as we've done away with the central registered list of protocols, and instead demand the user call nng_xxx_open() where xxx is a protocol name. (We did keep a table around in the compat framework though.) There is a nice way for protocols to plug in via an nni_proto_open(), where they can use a generic constructor that they use to build a protocol specific constructor (passing their ops vector in.)
* Make reqrep test more robust; sock test faster.Garrett D'Amore2017-06-25
|
* fixes #18 Sockets should be uint32_t's (handles) not pointers.Garrett D'Amore2017-01-20
|
* Fix leak in surveyor pipe.Garrett D'Amore2017-01-19
|
* Fixes for valgrind issues.Garrett D'Amore2017-01-18
|
* Various complaints found in AppVeyor build.Garrett D'Amore2017-01-16
|
* Bunch of copyright fixes.Garrett D'Amore2017-01-06
|
* 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.
* Added test for cancellation, fixed retry bug.Garrett D'Amore2017-01-05
| | | | | | On retry we were pushing back to the queue. The problem with this is that we could wind up pushing back many copies of the message if no reader was present. The new code ensures at most one retry is outstanding.
* Leak fixes for valgrind.Garrett D'Amore2017-01-02
|
* 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.
* Begin testing REQ/REP.Garrett D'Amore2017-01-02