api: notifications for video stream (#884)

This commit is contained in:
bicarus
2026-08-22 00:20:41 -07:00
committed by GitHub
parent b9c8afbbc1
commit 8acd433ec6
4 changed files with 54 additions and 6 deletions
+4 -1
View File
@@ -1450,7 +1450,10 @@ void basic_tcp_server::accept_thread()
while (_p->isRunning)
{
detail::connection_impl conn_impl;
conn_impl.socket = ::accept(_p->serverSocket, reinterpret_cast<struct sockaddr *>(&conn_impl.from), nullptr);
// addrlen must be a valid in/out pointer or the OS leaves conn_impl.from untouched,
// so the peer address silently reads back as 0.0.0.0
int from_len = sizeof(conn_impl.from);
conn_impl.socket = ::accept(_p->serverSocket, reinterpret_cast<struct sockaddr *>(&conn_impl.from), &from_len);
conn_impl.id = _p->nextClientID++;
if (!_p->nextClientID)