mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Include PID in broadcast message.
This commit is contained in:
parent
ff36c9004f
commit
f509ed1561
@ -732,6 +732,7 @@ static BroadcastMessage& GetBroadcastMessage( const char* procname, size_t pnsz,
|
||||
msg.broadcastVersion = BroadcastVersion;
|
||||
msg.protocolVersion = ProtocolVersion;
|
||||
msg.listenPort = port;
|
||||
msg.pid = GetPid();
|
||||
|
||||
memcpy( msg.programName, procname, pnsz );
|
||||
memset( msg.programName + pnsz, 0, WelcomeMessageProgramNameSize - pnsz );
|
||||
|
@ -10,7 +10,7 @@ namespace tracy
|
||||
constexpr unsigned Lz4CompressBound( unsigned isize ) { return isize + ( isize / 255 ) + 16; }
|
||||
|
||||
enum : uint32_t { ProtocolVersion = 60 };
|
||||
enum : uint16_t { BroadcastVersion = 2 };
|
||||
enum : uint16_t { BroadcastVersion = 3 };
|
||||
|
||||
using lz4sz_t = uint32_t;
|
||||
|
||||
@ -127,6 +127,7 @@ struct BroadcastMessage
|
||||
uint16_t broadcastVersion;
|
||||
uint16_t listenPort;
|
||||
uint32_t protocolVersion;
|
||||
uint64_t pid;
|
||||
int32_t activeTime; // in seconds
|
||||
char programName[WelcomeMessageProgramNameSize];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user