| Commit message (Collapse) | Author | Age |
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This is partly caused by a race, but also an incorrect boolean short-circuit
that I had not reasoned about properly. Mostly changing the boolean
order fixes the condition, so that we prefer to start than to stop, if both
are set.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Also, while here fixed a bug for the PAIR protocol in compat mode.
It should now be possible to import more of the nanomsg tests directly
with little or no modification.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
This allows us to enable the last test case for compat_reqrep.
|
| |
|
|
|
|
|
|
| |
I implemented the reqrep compatibility test, which uncovered a few
semantic issues I had in the REQ/REP protocol, which I've fixed.
There are still missing things. and at least one portion of the req/rep
test suite cannot be enabled until I add tuning of the reconnect timeout,
which is currently way too long (1 sec) for the test suite to work.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
I seem to be having a very difficult time getting dual-stack sockets
to function properly on Windows. I've sort of abandoned it for now.
I need to think about how to solve this -- it's not clear to me
right now whether dual stack sockets are the right answer or not.
People do expect these to work, but a tcp6:// url might be more
elegant.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This gives a better idea of pipe ID uniqueness, and is a step towards
conversion of the API to use IDs instead of pointers.
|
| |
|
|
|
|
| |
This will allow us to use idhash tables to manage id handles a bit more
flexibly. For example, sockets, pipe IDs, etc. can all be generated, and
we can use hash tables to ensure that values do not collide.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Sleep() on Win32 rounds *down*, leading to truncated timeouts.
What we do is change our sleep routing to start incrementally
sleeping by 1ms until the tick count is reached. This ensures
we don't wake early.
This problem affects condition variables too, which means that some
timeouts may occur up to one clock tick early (15ish ms). This should
not be a problem for most users, who should really only be setting
timeouts in quantities of a second or greater.
|
| |
|
|
|
|
| |
This was the main blocker, I think, for the nanomsg legacy compat
shim. Now that we have this, it should be relatively straight-forward
to implement the legacy nanomsg API, including the SENDFD, RECVFD thing.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|