| Commit message (Collapse) | Author | Age |
| ... | |
| | |
|
| |
|
|
|
| |
While here renamed a couple of symbols to avoid conflation with
the supplemental websocket functions of the same name.
|
| | |
|
| |
|
|
|
|
| |
Inproc doesn't have any real need for action here, as it's simple,
but the stub implementation will let us remove the check in the
common code layer.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This should allow us to stop the endpoints early, without freeing
them. This ensures that pipe creation has ended before we start
tearing down pipes.
|
| |
|
|
|
|
|
|
|
|
|
| |
This refactors a lot of the IPC code to hopefully address various
hangs on shutdown, etc. The problem is that named pipes are not
terrifically reliable when it comes to aborting ConnectNamedPipe.
Additionally there were some logic errors in some of our code that
left things rather brittle.
Ultimately this all needs to be replaced with UNIX domain sockets
which are superior in many ways.
|
| |
|
|
|
| |
This same test fails on Windows using IPC, and its good to know
that it works flawlessly for TCP.
|
| |
|
|
|
| |
This allows us to eliminate some extra reference counting and
reaping related complexity.
|
| |
|
|
|
|
|
| |
This eliminates the need for separate reap operations, and it
also eliminates a few failure modes, further simplifying the code.
This is the first transport to get this treatment. The others will follow.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a new transport API, which should make it easier for transports
to rely upon lifetime guarantees made by the common SP framework, thus
eliminating the need for transport specific reference counters, reap
lists, and similar.
The transport declares the size of the object in the ops vector (for
pipe, dialer, or listener), and the framework supplies one allocated
using the associated allocator.
For now these add the pipe object to the socket and endpoint using
linked linked lists. The plan is to transition those to reference
counts which should be lighter weight and free form locking issues.
The pipe teardown has been moved more fully to the reaper, to avoid
some of the deadlocks that can occur as nni_pipe_close can be called
from almost any context.
For now the old API is retained as well, but the intention is to convert
all the transports and then remove it.
|
| |
|
|
|
|
| |
If an error occurs, the application gets to know about it. There
cannot be external factors that cause us to spin for memory, since
this is not accessible via the network.
|
| |
|
|
| |
While here initialize the message to avoid valgrind complaints.
|
| |
|
|
|
|
|
|
|
| |
The use of task_abort to prematurely fail an aio at scheduling
time was a mistake, because it could have led to duplicate calls
to nng_aio_finish(). We do need to ensure that we leave an indicator
so that nni_aio_schedule can return the abort status to caller,
in the case that abort is called between the nni_aio_begin and
nni_aio_schedule calls.
|
| |
|
|
|
|
| |
The aio structures need to be finalized, and the sockets should
be held until the device is totally finalized to prevent any
possible use after free.
|
| |
|
|
|
|
| |
We get test failures somewhat frequently due to port conflicts.
This attempts to make more of the tests use the trick of binding
to port 0, and letting us use the random port instead.
|
| |
|
|
| |
This covers both the ttransport and the supplemental layers.
|
| | |
|
| |
|
|
|
|
| |
Once a context has started the process of close, further attempts
to close it will return NNG_ECLOSED. What was I thinking to ever
do anything else?
|
| |
|
|
|
|
|
|
| |
Operations that might be performed during teardown, such as reaping,
waiting, closing, freeing, should only be done if the aio has properly
been initialized. This is important for certain simple cases where
inline aio objects are used, and initialization of an outer object can
fail before the enclosed aio is initialized.
|
| | |
|
| |
|
|
|
| |
This is not needed for this, but it is the only transport that does
not have it, and adding it simplifies logic in the common code.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Make sure *everything* is drained before proceeding all the way
to deallocation.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Probably other subsystems should get the same treatment. We need
to basically start the process of shutting down so that subsystems
know to cease operation before we rip memory out from underneath them.
This ensures that no new operations can be started as well, once we
have begun the process of teardown.
We also enhanced the completion of sleep to avoid some extra locking
contention, since the expiration *is* the completion.
Includes a test for this case.
|
| |
|
|
|
| |
We do not want to let operations restart if we're in the process of shutting
down. This ensures that they get a reasonable hard failure.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
This starts by using this for the nni_pipe, but we will use it
for the other primary objects as well. This should simplify
the tear down and hopefully eliminate some races.
It does mean that pipe destruction goes through an additional
context switch, for now at least. This shouldn't be on the hot
data path anyway.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This API exists to support tests and similar cases where port 0 is
used to choose a dynamic port. Once the port is bound, and an actual
value is known, it can be patched in using this API.
|
| |
|
|
| |
This fixes a possible failure condition on teardown.
|
| |
|
|
|
| |
This hopefully addresses a long standing bug with Windows IPC sometimes
hanging on shut down.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Because it is typically associated with insecure code, use of sprintf
is discouraged. Note that our usage was actually quite careful and
not insecure, but its mere presence raises concern especially by parties
who are unwilling or unable to assess the actual code for correctness.
A better choice here would be strlcat, but strlcat is not universally
available.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Also renamed this to tcp_stream_test.
|
| | |
|
| | |
|
| |
|
|
|
| |
While here we added a test for nng_cv_wake1 to demonstrate it does
not fall afoul of the thundering herd.
|
| | |
|
| | |
|
| | |
|