1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Send protocol version to verify handshake.

This commit is contained in:
Bartosz Taudul
2018-09-09 19:28:53 +02:00
parent db1d7d2c92
commit 984a711666
6 changed files with 85 additions and 3 deletions
+9
View File
@@ -9,6 +9,8 @@
namespace tracy
{
enum : uint32_t { ProtocolVersion = 0 };
using lz4sz_t = uint32_t;
enum { TargetFrameSize = 256 * 1024 };
@@ -30,6 +32,13 @@ enum ServerQuery : uint8_t
enum { HandshakeShibbolethSize = 8 };
static const char HandshakeShibboleth[HandshakeShibbolethSize] = { 'T', 'r', 'a', 'c', 'y', 'P', 'r', 'f' };
enum HandshakeStatus : uint8_t
{
HandshakePending,
HandshakeWelcome,
HandshakeProtocolMismatch,
};
enum { WelcomeMessageProgramNameSize = 64 };
enum { WelcomeMessageHostInfoSize = 1024 };