aboutsummaryrefslogtreecommitdiff
path: root/src/core/msgqueue.h
Commit message (Collapse)AuthorAge
* Liberally apply some UWYI (use what you include) to header filesGarrett D'Amore2025-01-05
|
* fixes #814 mq_get_error should goGarrett D'Amore2020-02-06
|
* fixes #815 Eliminate socket filters on message queuesGarrett D'Amore2019-03-13
| | | | | | | This also eliminates the enforcement of NNG_OPT_RECVMAXSZ for inproc, which never really made much sense. This helps inproc go faster. While here, also clean up the entry point for protocols to support a drain option, since we don't use that anywhere.
* fixes #892 remove statistics from message queuesGarrett D'Amore2019-02-23
|
* fixes #812 message queue put_error unusedGarrett D'Amore2018-12-11
|
* update the comment (nng_msgq_put_until doesn't exists anymore)QXSoftware2018-10-02
|
* fixes #4 Statistics supportGarrett D'Amore2018-09-03
| | | | | | | | | | | | | | | | This introduces new public APIs for obtaining statistics, and adds some generic stats for dialers, listeners, pipes, and sockets. Also added are stats for inproc and pairv1 protocol. The other protocols and transports will have stats added incrementally as time goes on. A simple test program, and man pages are provided for this. Start by looking at nng_stat(5). Statistics does have some impact, and they can be disabled by using the advanced NNG_ENABLE_STATS (setting it to OFF, it's ON by default) if you need to build a minimized configuration.
* fixes #364 kill off nni_msgq_set_best_effort()Garrett D'Amore2018-04-24
|
* fixes #342 Want Surveyor/Respondent context supportGarrett D'Amore2018-04-24
| | | | | | | | | | | | | | | | fixes #360 core should nng_aio_begin before nng_aio_finish_error fixes #361 nng_send_aio should check for NULL message fixes #362 nni_msgq does not signal pollable on certain events This adds support for contexts for both sides of the surveyor pattern. Prior to this commit, the raw mode was completely broken, and there were numerous other bugs found and fixed. This integration includes *much* deeper validation of this pattern. Some changes to the core and other patterns have been made, where it was obvioius that we could make such improvements. (The obviousness stemming from the fact that RESPONDENT in particular is very closely derived from REP.)
* fixes #346 nng_recv() sometimes acts on null `msg` pointerGarrett D'Amore2018-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | This closes a fundamental flaw in the way aio structures were handled. In paticular, aio expiration could race ahead, and fire before the aio was properly registered by the provider. This ultimately led to the possibility of duplicate completions on the same aio. The solution involved breaking up nni_aio_start into two functions. nni_aio_begin (which can be run outside of external locks) simply validates that nni_aio_fini() has not been called, and clears certain fields in the aio to make it ready for use by the provider. nni_aio_schedule does the work to register the aio with the expiration thread, and should only be called when the aio is actually scheduled for asynchronous completion. nni_aio_schedule_verify does the same thing, but returns NNG_ETIMEDOUT if the aio has a zero length timeout. This change has a small negative performance impact. We have plans to rectify that by converting nni_aio_begin to use a locklesss flag for the aio->a_fini bit. While we were here, we fixed some error paths in the POSIX subsystem, which would have returned incorrect error codes, and we made some optmizations in the message queues to reduce conditionals while holding locks in the hot code path.
* fixes #344 nn_poll() legacy API missingGarrett D'Amore2018-04-16
| | | | | | | | | | | | This includes the test from legacy libnanomsg and a man page. We have refactored the message queue notification system so that it uses nni_pollable, leading we hope to a more consistent system, and reducing the code size and complexity. We also fixed the size of the NN_RCVFD and NN_SNDFD so that they are a SOCKET on Windows systems, rather than an integer. This addresses 64-bit compilation problems.
* fixes #308 Close can blockGarrett D'Amore2018-04-14
| | | | | | | | | | | | | | | | | | | | Ultimately, this just removes the support for lingering altogether. Based on prior experience, lingering has always been unreliable, and was removed in legacy libnanomsg ages ago. The problem is that operating system support for lingering is very inconsistent at best, and for some transports the very concept is somewhat meaningless. Making things worse, we were never able to adequately capture an exit() event from another thread -- so lingering was always a false promise. Applications that need to be sure that messages are delivered should either include an ack in their protocol, use req/rep (which has an ack), or inject a suitable delay of their own. For things going over local networks, an extra delay of 100 msec should be sufficient *most of the time*.
* fixes #173 Define public HTTP server APIGarrett D'Amore2018-02-01
| | | | | | | | | | | | | | | | | | | | | | | This introduces enough of the HTTP API to support fully server applications, including creation of websocket style protocols, pluggable handlers, and so forth. We have also introduced scatter/gather I/O (rudimentary) for aios, and made other enhancements to the AIO framework. The internals of the AIOs themselves are now fully private, and we have eliminated the aio->a_addr member, with plans to remove the pipe and possibly message members as well. A few other minor issues were found and fixed as well. The HTTP API includes request, response, and connection objects, which can be used with both servers and clients. It also defines the HTTP server and handler objects, which support server applications. Support for client applications will require a client object to be exposed, and that should be happening shortly. None of this is "documented" yet, bug again, we will follow up shortly.
* fixes #132 Implement saner notification for file descriptorsGarrett D'Amore2017-10-24
| | | | | | | | | This eliminates the "quasi-functional" notify API altogether. The aio framework will be coming soon to replace it. As a bonus, apps (legacy apps) that use the notification FDs will see improved performance, since we don't have to context switch to give them a notification.
* fixes #112 Need to move some stuff from socket to message queuesGarrett D'Amore2017-10-23
|
* Remove some dead code; msg queue depths are always unsigned.Garrett D'Amore2017-08-07
|
* Give up on uncrustify; switch to clang-format.Garrett D'Amore2017-07-10
|
* Remove the unused infinite timeout versions of msgq.Garrett D'Amore2017-07-03
|
* Delete unused msgq_notify. (We use aios instead.)Garrett D'Amore2017-07-03
|
* Use common aio cancellation.Garrett D'Amore2017-07-02
|
* Notification working - separate thread now.Garrett D'Amore2017-03-11
|
* Surveyor pattern callback-driven.Garrett D'Amore2017-03-10
|
* Pipeline protocol now entirely callback driven.Garrett D'Amore2017-03-04
|
* Timer implementation. Operations can timeout now?Garrett D'Amore2017-03-03
|
* Start of msgq aio.Garrett D'Amore2017-03-01
|
* We don't need putback on message queues after all.Garrett D'Amore2017-02-18
|
* Event notification via pollable FDs verified working.Garrett D'Amore2017-01-22
|
* Recv/Send event plumbing implemented (msgqueue and up).Garrett D'Amore2017-01-16
| | | | | | | | This change provides for a private callback in the message queues, which can be used to notify the socket, and which than arranges for the appropriate event thread to run. Upper layer hooks to access this still need to be written.
* Add survey test (and fix survey pattern).Garrett D'Amore2017-01-09
| | | | | | | As part of this, we've added a way to unblock callers in a message queue with an error, even without a signal channel. This was necessary to interrupt blockers upon survey timeout. They will get NNG_ETIMEDOUT, but afterwards callers get NNG_ESTATE.
* Change a bunch of copyrights to 2017 for work done since the 1st.Garrett D'Amore2017-01-05
|
* PUB protocol (untested).Garrett D'Amore2017-01-05
|
* Change msgqueue -> msgq.Garrett D'Amore2017-01-02
|
* Implement msgqueue_putback.Garrett D'Amore2016-12-28
| | | | | | | This function is called when we wish to return a message to the queue after examining it. It can also be used by the resender in the REQ protocol. Critically it does not disrupt the ordering of other messages. This is a non-blocking operation.
* Buffer resizing implemented. (Needed for single threaded inproc tests.)Garrett D'Amore2016-12-27
|
* Endpoint dialer implemented.Garrett D'Amore2016-12-22
|
* Work on endpoints. More C99 & type cleanups.Garrett D'Amore2016-12-22
|
* Inline locks (fewer allocs), simpler absolute times for wakeups. nn_sock_recv.Garrett D'Amore2016-12-22
|
* Synchronization enhancements - inproc & msgqueue. Absolute waits...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!
* Make an interruptible version of message queues.Garrett D'Amore2016-12-12
|
* New inproc transport.Garrett D'Amore2016-12-12
Lots of supporting changes.