aboutsummaryrefslogtreecommitdiff
path: root/src/core/socket.h
Commit message (Collapse)AuthorAge
...
* Endpoint now holds a reference on the socket.Garrett D'Amore2017-06-06
|
* New object hash implementation, used by socket (to start).Garrett D'Amore2017-06-05
|
* More cleanups. Delete unused call, isolate ep list creation.Garrett D'Amore2017-03-19
|
* Reduce socket/pipe private data coupling.Garrett D'Amore2017-03-19
|
* Notification working - separate thread now.Garrett D'Amore2017-03-11
|
* Eliminate per-socket workers.Garrett D'Amore2017-03-10
|
* Good-bye reaper thread.Garrett D'Amore2017-03-10
|
* Start of close related race fixes. Scalability test.Garrett D'Amore2017-03-10
|
* Add device support & testing. Bus semantic fix.Garrett D'Amore2017-01-27
| | | | | | | | | | | This adds nn_device and nng_device. There were some internal changes required to fix shutdown / close issues. Note that we shut down the sockets when exiting from device -- this is required to make both threads see the failure and bail, since we are not using a single event loop. I also noticed that the bus protocol had a bug where it would send messages back to the originator. This was specifically tested for in the compat_device test, and we have fixed it.
* Add endpoint tuning of maxrcv size. Fix cmsg API.Garrett D'Amore2017-01-24
| | | | | | | | | | | | | | The CMSG handling was completely borked. This is fixed now, and we stash the SP header size (ugh) in the CMSG contents to match what nanomsg does. We now pass the cmsg validation test. We also fixed handling of certain endpoint-related options, so that endpoints can get options from the socket at initialization time. This required a minor change to the transport API for endpoints. Finally, we fixed a critical fault in the REP handling of RAW sockets, which caused them to always return NNG_ESTATE in all cases. It should now honor the actual socket option.
* Adds NNG_OPT_SENDFD and NNG_OPT_RECVFD socket options (untested).Garrett D'Amore2017-01-21
|
* Fix leaks in bus, socket leaks, tighten up close-side refcnting.Garrett D'Amore2017-01-21
| | | | | | | | | | | | | | This does a few things. First it closes some preexisting leaks. Second it tightens the overall close logic so that we automatically discard idhash resources (while keeping numeric values for next id etc. around) when the last socket is closed. This then eliminates the need for applications to ever explicitly terminate resources. It turns out platform-specific resources established at nni_init() time might still be leaked, but it's also the case that we now no longer dynamically allocate anything at platform initialization time. (This presumes that the platform doesn't do so under the hood when creating critical sections or mutexes for example.)
* fixes #18 Sockets should be uint32_t's (handles) not pointers.Garrett D'Amore2017-01-20
|
* Reaper exits too soon, leaking bits.Garrett D'Amore2017-01-18
|
* Pipe IDs are now tracked on global ID hashes.Garrett D'Amore2017-01-17
|
* Pipe IDs are now tracked by hash table for performance.Garrett D'Amore2017-01-17
| | | | | This gives a better idea of pipe ID uniqueness, and is a step towards conversion of the API to use IDs instead of pointers.
* 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.
* 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.
* Move to generic socket & pipe workers, and up to 4 each.Garrett D'Amore2017-01-08
| | | | | This should eliminate all need for protocols to do their own thread management tasks.
* Simplify locking for protocols.Garrett D'Amore2017-01-07
| | | | | | | | | In an attempt to simplify the protocol implementation, and hopefully track down a close related race, we've made it so that most protocols need not worry about locks, and can access the socket lock if they do need a lock. They also let the socket manage their workers, for the most part. (The req protocol is special, since it needs a top level work distributor, *and* a resender.)
* Change a bunch of copyrights to 2017 for work done since the 1st.Garrett D'Amore2017-01-05
|
* Add nng_shutdown() for sockets to help avoid close race.Garrett D'Amore2017-01-05
| | | | Also we added a two phase shutdown for threads.
* 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.
* Protocol initialization restructuring.Garrett D'Amore2017-01-02
|
* Endpoint renaming.Garrett D'Amore2017-01-02
|
* Uncrustify.Garrett D'Amore2017-01-02
|
* Rename nni_socket to nni_sock.Garrett D'Amore2017-01-02
|
* Change msgqueue -> msgq.Garrett D'Amore2017-01-02
|
* Final purge of old threading & synch stuff.Garrett D'Amore2017-01-01
|
* Socket reaper uses new-thread.Garrett D'Amore2017-01-01
|
* Factor out repeated protocol code into common.Garrett D'Amore2016-12-29
|
* Move option helpers to their own file.Garrett D'Amore2016-12-29
|
* Pipe ID calculations & socket error functions.Garrett D'Amore2016-12-28
| | | | | | | | | | | The use of platform_next_id was a bit off, because it could give back pipe IDs that were too large (the high order bit must be clear), and in very long running applications serving many connections, the IDs could wrap and lead to duplicates. Also we have added functions to set the recverr or senderr values, which can be used by protocols -- either during initialization, or during filters. (REQ uses this for example.)
* Start of REQ protocol. Still need hook handling and resender.Garrett D'Amore2016-12-28
|
* Substantial fixes for listen & dialers.Garrett D'Amore2016-12-25
| | | | | | | | | | At this point listening and dialing operations appear to function properly. As part of this I had to break the close logic up since otherwise we had a loop trying to reap a thread from itself. So there is now a separate reaper thread for pipes per-socket. I also changed lists to be a bit more rigid, and allocations now zero memory initially. (We had bugs due to uninitialized memory, and rather than hunt them all down, lets just init them to sane zero values.)
* New dial/listen API. Dialing might work now.Garrett D'Amore2016-12-25
| | | | | | | | | In order to give control over synchronous vs. async dialing, we provide a flag to indicate synchronous dialing is desired. (Hmm. Should we reverse the default sense?) We extend listen to have the same flag. Logic is moved to endpt.c since dialing is really and endpoint specific operation. There are other minor related bug fixes here too.
* nng_setopt works (rcvtimeout, etc.) External API adjustments.Garrett D'Amore2016-12-23
| | | | | | | The external API now uses simpler names for various things, notably we ditch the whole nng_socket_xx prefix. For example, intstead of nng_socket_create, we just use nng_open(). There are no more nng_socket_xxx calls.
* Some tests around recvmsg (no senders yet). Fixes for some edge cases.Garrett D'Amore2016-12-23
|
* More C99-ification. Also end the _t thing for types (ISO C rules).Garrett D'Amore2016-12-22
|
* Implemened synchronous & asynchronuos dialer, accepter. Getting close...Garrett D'Amore2016-12-22
|
* Added lingering (1s default.)Garrett D'Amore2016-12-22
|
* Implemented dialer core.Garrett D'Amore2016-12-22
|
* Endpoint dialer implemented.Garrett D'Amore2016-12-22
|
* Inline locks (fewer allocs), simpler absolute times for wakeups. nn_sock_recv.Garrett D'Amore2016-12-22
|
* Use C99 structure initializers FTW. Various other changes.Garrett D'Amore2016-12-22
|
* Logic for socket shutdown, cleanup, and draining figured out.Garrett D'Amore2016-12-22
| | | | | There's work to do still, but I've left clear indications of the design in comments. Some ugly mysteries are now solved.
* Uncrustify configuration, and shorter copyright banners, plus reformatGarrett D'Amore2016-12-21
| | | | code with uncrustify. (Minor adjustments.) No more arguments!
* nni_socket_add_pipe and nni_socket_remove_pipe implementation.Garrett D'Amore2016-12-14
|
* Better separate public vs. private names.Garrett D'Amore2016-12-14