| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Nice to make debug logs more friendly to read.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add one new public function, nice_agent_send_messages_nonblocking(),
which replaces nice_agent_send_full(). This isn’t an API break, because
nice_agent_send_full() hasn’t been in a release yet. The new API allows
sending multiple messages in a single call, and supports vectors of
buffers to transmit the messages from.
The existing nice_agent_send() API has been left untouched, although
it’s a bit of a bugbear because it’s non-blocking and doesn’t fit with
the new *_nonblocking() naming scheme. Oh well.
This doesn’t bring any notable changes to the number of memcpy()s on the
critical path: it remains at zero for the common cases and common socket
types. It introduces the possibility for future work to eliminate some
memcpy()s in more complex socket types, like tcp-turn and tcp-bsd, but
these optimisations have not been made yet. FIXME comments have been
added.
This includes modifications to the test-send-recv unit test to cover the
new API.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add two new public functions:
• nice_agent_recv_messages()
• nice_agent_recv_messages_nonblocking()
which allow receiving multiple messages in a single call, and support
vectors of buffers to receive the messages into.
The existing nice_agent_recv[_nonblocking]() APIs have been left
untouched.
This tidies up a lot of the message handling code internally, and
eliminates a couple of memcpy()s. There are still a few more memcpy()s
on the critical path, which could be eliminated with further work.
In the reliable agent case, every message is memcpy()ed twice: once into
the pseudo-TCP receive buffer, and once out of it. The copy on input
could be eliminated (in the case of in-order delivery of packets) by
receiving directly into the receive buffer. The copy on output can’t be
eliminated except in the I/O callback case (when
nice_agent_attach_recv() has been used), in which case the callback
could be invoked with a pointer directly into the pseudo-TCP receive
buffer.
In the non-reliable agent case, zero memcpy()s are used.
A couple of the more complex socket implementations (TURN and HTTP) have
slow paths during setup, and partially also during normal use. These
could be optimised further, and FIXME comments have been added.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the recv() API with a recv_messages() API, which supports
receiving multiple messages, each with multiple buffers rather than a
single monolithic buffer.
This doesn’t break API, as the socket API is not exposed outside
libnice. It does introduce a new struct: NiceInputMessage, which is
analogous to struct mmsghdr.
This includes updates to the test-bsd test to cover the changed API.
|
|
|
|
|
|
|
|
|
| |
This is a non-blocking variant of nice_agent_recv(), and will be used
internally by the GPollableInputStream implementation. External
implementations may use it as well.
It reserves the right to iterate the main context, but doesn’t currently
do so.
|
|
|
|
|
| |
This allows creation of a NiceIOStream from an existing NiceAgent
instance.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds three new classes:
• NiceIOStream
• NiceInputStream
• NiceOutputStream
which allow wrapping a single stream/component pair in an I/O stream
which can be used with the standard GIO functions.
The streams are constructed as wrappers around a NiceAgent, with changes
to the NiceAgent’s properties affecting all instantiated streams.
Streams are only supported for reliable connections.
If the NiceAgent stream which underlies a NiceInputStream,
NiceOutputStream or NiceIOStream is removed, the I/O stream is marked as
closed.
This is based on work originally done by Youness Alaoui
<youness.alaoui@collabora.co.uk>.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds GError and GCancellable parameters to the existing
nice_agent_send() API, and is identical in all other respects (notably,
it is non-blocking).
The GCancellable is currently unused, but could be used in future if the
API grows to support blocking writes.
The GError is used to return more interesting error codes than just
‘-1’.
|
|
|
|
|
|
|
|
| |
This is a blocking receive function, designed to be called from a worker
thread. It cannot be used in conjunction with the existing
nice_agent_attach_recv() API, as the blocking receive and the GSource
would compete over access to the single copy of the data in the kernel’s
receive buffer.
|
| |
|
|
|
|
| |
Older compilers don't understand all of the flags
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This adds nice_agent_set_stream_name, nice_agent_get_stream_name,
nice_agent_generate_local_sdp, nice_agent_parse_remote_sdp.
|
| |
|
|
|
|
| |
local host candidates
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
exported symbols list
|
| |
|
| |
|
| |
|
|
|
|
| |
into libstun
|
| |
|
| |
|
| |
|
|
|
|
| |
next version
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
interface.
darcs-hash:20070830072715-77cd4-44d25a361efc2be5d0582d025081fb5143d9c5f8.gz
|
|
|
|
| |
darcs-hash:20070720213254-77cd4-7b845b8a05e5ba45ed78006196515d1634dd830b.gz
|