Commit Graph

12 Commits

Author SHA1 Message Date
Bartosz Taudul
538af5c89c Learn the actual port of an adopted listen socket.
Adopting a pre-bound socket via SetReservedListenSocket left Worker()'s
port bookkeeping untouched, so GetPort() and the broadcast announcement
reported the computed default instead of the port the socket listens on.
The monitor kept this correct by mirroring the reserved port into
TRACY_PORT; direct users of the public API had no such coupling.

The bound socket is now authoritative: Worker() reads the local port
back via getsockname after binding. The search-loop bookkeeping stays
only as a fallback for a getsockname failure.
2026-08-31 19:30:23 +02:00
Bartosz Taudul
ae70255b4e Adopt a pre-bound listen socket. 2026-08-31 01:12:39 +02:00
Bartosz Taudul
f5938e0336 Remove unused Socket::ConnectBlocking. 2026-08-22 02:20:24 +02:00
Bartosz Taudul
56f5d1239d Add IsConnecting and interruptible ReadUpTo to Socket. 2026-08-22 02:20:21 +02:00
Bartosz Taudul
453d649c1a Add TRACY_ASSERT for custom assert implementations. 2026-08-16 13:32:44 +02:00
Clément Grégoire
e7c71c991c Drop sys/param.h dependency for BSD detection
Replace `#ifdef BSD` (which requires including `<sys/param.h>` first) with explicit checks for `__FreeBSD__`, `__NetBSD__`, `__OpenBSD__` and `__DragonFly__`, matching how these BSDs are already enumerated elsewhere in the codebase (OS name strings, thread id helpers, etc.).

This also avoids leaking the `sys/param.h` requirement through public headers (`TracySysTime.hpp`, `TracyCallstack.h`), where consumers would otherwise need it to correctly see `TRACY_HAS_SYSTIME` / `TRACY_HAS_CALLSTACK`.
`libbacktrace/config.h` is left as-is — it's third-party and only included from .c files where the `BSD` macro can still be picked up locally.

Note: for `setsockopt( m_sock, IPPROTO_IPV6, IPV6_V6ONLY, (const char*)&val, sizeof( val ) );` I added `__APPLE__` too since this was the only place where it was not checked explicitely.
2026-05-21 10:18:30 +02:00
Bartosz Taudul
58eaa330af Set TCP_NODELAY on profiler data channel. 2026-05-06 00:12:21 +02:00
Bartosz Taudul
73694c7a24 Cleanup enums. 2026-01-24 01:50:11 +01:00
Bartosz Taudul
aac38a7deb Update CI.
Co-authored-by: Tom Atkinson <tja.atkinson@gmail.com>
2024-03-22 13:49:08 +01:00
Marcos Slomp
83b52d9a20 fix socket reuse logic in UdpListen::Listen() 2023-09-20 21:47:44 -07:00
Bartosz Taudul
778d0cb3fb Socket::ReadUpTo() doesn't support timeouts. 2023-04-16 12:19:48 +02:00
Bartosz Taudul
06c7984a16 Move all client headers and sources to public/ directory. 2022-07-17 15:47:38 +02:00