| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
This ensures UTF-8 output is printed correctly.
|
|
|
|
| |
This clarifies the log output a little.
|
| |
|
|
|
|
| |
This reverts commit 18e5dff4f25b12522e857c13d3ef3bdb40212246.
|
|
|
|
| |
changes
|
|
|
|
|
| |
We want ICE-TCP to not have reliable behavior unless the agent
is reliable otherwise it will confuse existing VoIP applications.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a massive commit that can't be split. We add ice-tcp support
into the agent by creating local host tcp-active/tcp-passive candidates.
We also need to find the local and remote candidates whenever we discover
a peer-reflexive because their data is important to setup the peer-reflexive
so a few changes were added to look for the local or remote candidate.
For TCP-ACTIVE remote peer-reflexive candidates, we can't add conncheck
pairs normally because TCP-PASSIVE (local) do not generate candidate pairs,
and we also can't have a connection from any local host, so we can only create
a single candidatepair with the local/remote that are connected.
The pair->socket of a candidate check pair will hold the connected tcp socket
(through connect for ACT or accept for PASS) and we will either have a
remote or a local peer-reflexive which will create a new candidate pair,
we cannot trigger checks on the initial candidate pair, we must only do it
on the new check pairs. but in the case of a tcp-passive, we don't get a new
local peer-reflexive candidate, so there is no new candidate with a new NiceSocket, so
when we get a triggered check, we need to match it to the candidate check pair
or when we select a pair, it will still use the original TCP-PASS socket.
We must store the new connected tcp socket in the peer reflexive candidates
since they represent that unique peer-reflx candidate's connection
|
| |
|
| |
|
|
|
|
| |
accept data reception on connected state
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now we will always give a handicap to UDP candidates, but still give
relays the lower priority. We have the following priorities now :
In reliable mode :
TCP Host : 120
TCP peer-refl : 110
TCP nat-assist : 105
TCP srv-refl : 100
UDP Host : 60
UDP peer-refl : 55
UDP nat-assist : 52
UDP srv-refl : 50
TCP relay : 10
UDP relay : 5
In unreliable mode :
UDP Host : 120
UDP peer-refl : 110
UDP nat-assist : 105
UDP srv-refl : 100
TCP Host : 60
TCP peer-refl : 55
TCP nat-assist : 52
TCP srv-refl : 50
UDP relay : 10
TCP relay : 5
|
| |
|
| |
|
|
|
|
| |
The farstream unit tests were using it.
|
| |
|
|
|
|
|
|
|
|
|
| |
As documented at the top of the file, this creates two PseudoTcpSockets
in a loopback configuration, and mutates the raw packets which are sent
between them, hoping to cause assertion failures and illegal memory
accesses in the pseudotcp code.
Best run under Valgrind or GDB.
|
| |
|
|
|
|
|
|
| |
Some platforms have a larger alignment requirement for struct sockaddr_* than
for plain struct sockaddr, in that case, we need to make sure that the incoming pointer
has the right alignement before taking it in.
|
|
|
|
| |
So use guint64 everywhere, this is never supposed to be negative.
|
|
|
|
| |
There are more than one callback that could stop it
|
| |
|
| |
|
| |
|
|
|
|
| |
its unreliable
|
| |
|
| |
|
|
|
|
|
| |
We wan't to make sure not to have a race where a thread blocks in a blocking
receive or send while nice_agent_remove_stream() is called
|
|
|
|
| |
Also, keep a pointer to the other structure for tests to use
|
|
|
|
|
| |
Also made the GIOStream into a singleton, it always returns the same one.
Also make it impossible to create a GIOStream for a non-existing stream/component
|
|
|
|
| |
It was used correctly only half the time anyway
|
|
|
|
|
| |
We never send multiple messages to separate targets in practice, so
this will simplify the code
|
|
|
|
|
|
| |
Previously, there was a race between receiving the data packets and
changing state to READY, which would cause one of the final assertions
to fail.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the send() API with a send_messages() API, which supports
sending 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: NiceOutputMessage, which is
analogous to struct mmsghdr and NiceInputMessage.
This includes updates to the test-bsd test to cover the changed API.
The existing nice_socket_send() API has been retained as a thin wrapper
around nice_socket_send_messages(), for convenience only. It’s hoped
that internal usage of this API will decline to the point where it can
be removed.
|
| |
|
|
|
|
|
| |
The write() function already exists; we can’t re-define it as a
callback.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Destroying and creating GSources is expensive, so also don't destroy and
re-create if possible, instead lets use the new g_source_set_ready_time()
|
| |
|
|
|
|
|
|
| |
Since we define GLIB_VERSION_MIN_REQUIRED, GLib will not emit deprecated
function call warnings for functions like g_type_init() or
g_thread_init().
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
A g_usleep() was introduced in commit
e22ecb19662970a42def6df74db6359e58084727 to fix a potential race where
the non-main threads would finish all their work before the error_loop
was started, leaving the error_loop to run for 30s then abort the test.
A better fix, instead of doing a racy sleep, is to have the non-main
threads spin until the error_loop is running. GLib takes care of all the
locking for us, and since we don’t care about efficiency for test cases,
spinning is fine (the wait is also going to be quite short).
|
|
|
|
|
|
|
|
| |
This appeases GCC’s -Wswitch-enum warning, and makes it more obvious
that those enum cases have been explicitly considered, rather than just
forgotten about.
This introduces no functional changes.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Casting from one struct sockaddr type to another breaks C’s strict
aliasing rules (variables of different types cannot alias). Fix this
cleanly by using unions of struct sockaddrs to convert between the
types (i.e. type-punning).
I wish sockaddr didn’t have to be this painful.
See:
http://gcc.gnu.org/onlinedocs/gcc-4.4.1/gcc/Optimize-Options.html#Type_002dpunning
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This can only be called after we received a packet, where we already
adjust the clock
|