Convert each listener entity into a list.
Support a list of values for each option so that multiple
ports/addresses can be listed.
Keep previous behaviour unchanged: If ANY address is given, open
listeners for IPv4 and IPv6.
Change-Id: Ic54f28d1262f60d5e5c9d824a95e7c33ebc2aba9
All functions that create listener objects take a read-only endpoint, so
make them as const.
Remove the extra TOS argument to make all signatures the same.
Change-Id: I722c7665b192476d90dbf0ece200d0bfd34cb9eb
Forking to background kills already created threads, so forking must
happen first and thread creation after.
closes#1695
Change-Id: I743b890b83903d9e0b3248b032844e7e357d2307
We have long switched to having a single primary global poller, so
there's no point in passing the poller pointer around and storing it in
associated objects. Remove all remnants of non-global pollers.
Change-Id: I5a3fd217d5de51e839e2b04fec7e23643ee83631
This is a dependency of the poller and so is needed in lib/ as well to
make it usable.
Also consolidate the type.
Change-Id: I70ec8a200d6cd65710ac93636a9495cf24c35ef4
All timers have been moved to their dedicated timer threads, making this
mechanism obsolete.
The only victim is the timeout handling for TCP control streams. Since
other TCP streams aren't using timeout handling either, and the TCP
control socket is barely used by anyone, we can live with not having a
dedicated timeout for these streams for now.
Change-Id: I83d9b9a844f4f494ad37b44f5d1312f272beff3f
Move the `ice_slow_timer()` functionality to a separate thread,
so that we do the work more efficiently, and not be dependent
on the call_timer runs by poller.
Furthermore it makes more sense to keep in the `ice.c`,
since it obviously has to do with ice timing.
Additionally:
Update the test-stats due to these changes in the `call_timer()`
We have to call the `ice_slow_timer()` now explicitely from
the test-stats.c, because the `call_timer()` is not anymore
responsible for providing stats counters rate calculations.
Change-Id: I03377dd59ea71c27497e1f4d30164075f05165cd
To do the work more efficiently,
and not be dependent on the call_timer runs by poller,
we should move the ports iterations (stats update from the kernel)
functionality to a separate thread, to make it faster and
not be dependent on what happens in the `call_timer` at all.
Since it has nothing to do with the call timers.
As an additional benefit: we unload the `call_timer` runner.
Change-Id: I511529ce504ef3d29f4e9d6d731ffd470d78d27a
To do the work more efficiently,
and not be dependent on the call_timer runs by poller,
we should move the `stats_rate_min_max()` to a separate thread,
to make it faster and not be dependent on what happens in the `call_timer` at all.
Since it has nothing to do with the call timers.
Change-Id: I9a39e1b63cb8741377f5af5b2d52d4f8b428a0ad
To do the work more efficiently and not be dependent on
the `call_timer` runs by poller, we should move
the releasing of sockets to a separate thread, to make it
faster and not be dependent on what happens in the `call_timer`
at all. Since it has nothing to do with the call timers.
Since now we have two queues:
- thread scope (local): ports_to_release
- global one: ports_to_release_glob
`sockets_releaser()` uses the ports_to_release_glob,
meanwhile appending in the `call_timer()` happens using the
ports_to_release.
Change-Id: Iadd966ac895b2dd64f81269d4fdf5d83747fe0b7
Similar to the existing media_player, but instead of simply producing
its own standalone output media stream, the audio_player takes over the
entire media stream flowing to the receiver, including media forwarded
from the opposite side of the call, as well as media produced by the
media_player.
Change-Id: Ic34ecf08fc73b04210cfffb1a7d795b462ece5ea
commit 025f56212d
Author: Andreas Granig <andreas@granig.com>
Date: Tue Oct 4 14:23:01 2022 +0200
Document the mqtt-tls-alpn option
commit e6cc320d19
Author: Andreas Granig <andreas@granig.com>
Date: Mon Oct 3 21:41:14 2022 +0200
Add TLS ALPN option to be set when connecting MQTT
This is required to be set to "mqtt" for instance when connecting
to the AWS IoT Core data endpoint at port 443 to indicate we're
sending MQTT, because in that case websocket and mqtt shares the same
port for whatever reason.
Change-Id: I6a391e815411b178187ef42aa009e45853d1c388
Newer libwebsockets versions seem to use a longer internal timeout, so
an explicit "interrupt" is needed during shutdown to prevent a long wait
time.
Change-Id: I8f28ef658169178e35b40dd44520fbd7c812b590
To prevent a race condition that might miss updates about call info, set
up the Redis keyspace notifications first and then run loop to restore
calls from the existing data.
closes#1503
Change-Id: I6afa4c50fe0a34c602063fc2f45b2ee38133cf1e
Instead of having each thread sleep only a little while and then
periodically check for the shutdown flag, make them sleep longer and use
pthread_cancel() to interrupt the sleep during a shutdown in the
designated break points.
Change-Id: I13f1872a0176697e064ceef4062db6ca6ccf7a0e
Handling of dual stack v4/v6 was previously done by the individual
listener objects for INADDR_ANY listening addresses. If listening on
INADDR_ANY was requested, then each listener would create two instances,
one for IPv4 and one for IPv6. This works fine for INADDR_ANY but fails
for listening on host names that resolve to multiple addresses, such as
`localhost`.
Solve this by relieving the listener objects from handling this and
instead handle it in the code setting up the listeners. If a host name
resolves to multiple addresses, then set up multiple listeners (up to
two supported currently). This allows us to listen on `localhost` by
default and have both 127.0.0.1 and ::1 active. INADDR_ANY is handled
specially by also setting up :: in that case.
Change-Id: I2a1e1d7090d7d23863c7a9bb1e89b85ad2ea44f4