Skip to content

Commit

Permalink
Update to Tracy protocol 66 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
checkraisefold authored Jul 26, 2024
1 parent d7adaac commit 5e7139c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# RTracy server
This is server for streaming .utacy files generated by https://github.com/ParadiseSS13/byond-tracy to tracy https://github.com/wolfpld/tracy profiler

Works with Tracy 0.10 (protocol 64)
Works with Tracy 0.11 (protocol 66)

This server allow partial streaming of large snapshots to prevent huge memory usage

Expand Down
4 changes: 2 additions & 2 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ pub fn handle_client(stream: TcpStream, header: &UTracyHeader, locations: &Vec<S
return Err(format!("Invalid client, expected \"TracyPrf\", got {}", std::str::from_utf8(&client_name).unwrap()));
}
let version: u32 = bincode::decode_from_reader(&mut reader, BINCODE_CONFIG).map_err(|e| format!("{}", e))?;
if version != 64 {
if version != 66 {
writer.write(&[HandshakeStatus::HandshakeProtocolMismatch as u8]).map_err(|e| format!("{}", e))?;
return Err(format!("Invalid client version, expected 64, got {}", version));
return Err(format!("Invalid client version, expected 66, got {}", version));
}

writer.write(&[HandshakeStatus::HandshakeWelcome as u8]).map_err(|e| format!("{}", e))?;
Expand Down
3 changes: 2 additions & 1 deletion src/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,10 @@ pub enum ServerQueryType {
ServerQueryFrameName,
ServerQueryParameter,
ServerQueryFiberName,
ServerQueryExternalName,
// Items above are high priority. Split order must be preserved. See IsQueryPrio().
ServerQueryDisconnect,
ServerQueryCallstackFrame,
ServerQueryExternalName,
ServerQuerySymbol,
ServerQuerySymbolCode,
ServerQuerySourceCode,
Expand Down Expand Up @@ -394,6 +394,7 @@ pub enum QueryResponseType {
KeepAlive,
ThreadContext,
GpuCalibration,
GpuTimeSync,
Crash,
CrashReport,
ZoneValidation,
Expand Down

0 comments on commit 5e7139c

Please sign in to comment.