initial commit

This commit is contained in:
2026-08-27 15:38:55 +02:00
commit 0426b6eeec
23 changed files with 1635 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
package protocol
// Protocol message type names for clipsync v1.
Message_Type :: enum {
HELLO,
PAIR_REQUEST,
PAIR_CHALLENGE,
PAIR_CONFIRM,
PAIR_ACCEPT,
CLIP_UPDATE,
ACK,
ERROR,
PING,
PONG,
}
HELLO_Message :: struct {
version: string,
message_type: string,
device_id: string,
device_name: string,
platform: string,
tcp_port: int,
timestamp_ms: i64,
nonce: string,
}
make_hello_message :: proc(device_id, device_name, platform, nonce: string, tcp_port: int) -> HELLO_Message {
return HELLO_Message{
version = "1",
message_type = "HELLO",
device_id = device_id,
device_name = device_name,
platform = platform,
tcp_port = tcp_port,
timestamp_ms = 0,
nonce = nonce,
}
}