mirror of
https://github.com/wolfpld/tracy.git
synced 2026-06-08 08:33:48 +00:00
Move broadcast message parsing logic from profiler/src/main.cpp into server/TracyBroadcast.cpp/hpp. This reduces code duplication and enables reuse by other tools (e.g., multi-capture). ParseBroadcastMessage() handles all broadcast protocol versions (0-3) and returns std::optional<BroadcastMessage>. ClientUniqueID() generates a unique identifier from IP address and port. Co-authored-by: Grégoire Roussel <gregoire.roussel@wandercraft.eu>
17 lines
324 B
C++
17 lines
324 B
C++
#ifndef __TRACYBROADCAST_HPP__
|
|
#define __TRACYBROADCAST_HPP__
|
|
|
|
#include "TracyProtocol.hpp"
|
|
#include "TracySocket.hpp"
|
|
#include <optional>
|
|
|
|
namespace tracy
|
|
{
|
|
|
|
std::optional<BroadcastMessage> ParseBroadcastMessage( const char* msg, size_t msgLen );
|
|
uint64_t ClientUniqueID( const IpAddress& addr, uint16_t port );
|
|
|
|
}
|
|
|
|
#endif
|