Skip to content

Star 1275 pass client SRT version and latency to connected callbacks #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

permobergedge
Copy link
Contributor

Suggestion of a way to pass SRT library version from client and the negotiated latency back to the user of SRTNet.

We can then extend our logs from for example:
[2024-05-07 16:19:00.737] [LD_Pipeline] [acl-renderingen-771773] [info] program 1: Client connected to server: 127.0.0.1:4567
to:
[2024-05-07 16:19:00.737] [LD_Pipeline] [acl-renderingen-771773] [info] program 1: Client connected to server: 127.0.0.1:4567, SRT version: 1.4.4, latency: 3098

permobergedge and others added 29 commits July 7, 2023 09:24
STAR-896: If last client disconnected, break, and stop the server
STAR-840: implement use of alternative log handler
startClient now returns true even if the connection to the remote
end fails. The worker thread of the client will then try to
(re-)connect until a successfull connection is made.

To check if the client actually is connected, a new function:
isClientConnected was added.
If client disconnects or network is going down, the server will now
re-open the server socket and allow the client to re-connect. If
stop() is called, the server closes all sockets and stops as before.
…ller-mode

STAR-951: Change caller mode to do automatic re-connect attempts
* STAR-959 Bump SRT version to v1.5.3

* STAR-959 Fix binding to IPv6 ::
The new parameter failOnConnectionError controls the behaviour
of the startClient functions. If it is set to true and the
initial connection attempt to the server, which is done in
startClient, fails, the startClient call returns true. If it
is set to false the clientStart call returns true and the
worker thread is started which will now start to try to connect
to the server until stop() is called.
…xible

STAR-964: Add new parameter to startClient functions
Clean up development logs from connect attempt
Useful when server is started with port 0, to get which port
it automatically selected.
…_port

Add a small utility function to get the servers listening port
When server is in single client mode, we close the server
socket between each connection. Store the port that was
selected, in case local port was 0, to allow client to
re-connect on the same port.
…port-for-reuse

Star 1089 store automatic selected port for reuse
Since the log handler will be global, the log handler
and the set function was made static.
…ccept-flow

STAR-1232: Refactor how log handler is setup and used
…-connected-to-server

STAR-1254: Add a callback that user can set to be notified if caller …
Also added a new function to get a vector of just the sockets for
all the active clients.
Due to the test where we notify the condition before the client
will be added to the list in SRTNet we need to do this to avoid
flaky tests.
…s-function

STAR-1269: Refactor getActiveClients to return a copy of mClientList
…etActiveClientSockets

STAR-1269: Fix allocation bug of client sockets vector
… the socket

Pass a reference to a ConnectionInformation struct back to user
when a new client connects and the called connects to a server.
@permobergedge permobergedge deleted the star-1275-pass-client-srt-version-and-latency-to-connected-callbacks branch May 7, 2024 14:21
@permobergedge permobergedge restored the star-1275-pass-client-srt-version-and-latency-to-connected-callbacks branch May 7, 2024 14:22
telecomuk pushed a commit to telecomuk/cppSRTWrapper that referenced this pull request Oct 29, 2024
* STAR-842 Make bind address configurable in client mode

* STAR-842 Add method to get the bound SRT socket

* STAR-842 Fix initialization of sockaddr

* STAR-842 Clean up unit test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants