syntax = "proto3"; option go_package = "relay/internal/proto"; package proto; /* Mouse messages */ // MouseMove message message ProtoMouseMove { int32 x = 1; int32 y = 2; } // MouseMoveAbs message message ProtoMouseMoveAbs { int32 x = 1; int32 y = 2; } // MouseWheel message message ProtoMouseWheel { int32 x = 1; int32 y = 2; } // MouseKeyDown message message ProtoMouseKeyDown { int32 key = 1; } // MouseKeyUp message message ProtoMouseKeyUp { int32 key = 1; } /* Keyboard messages */ // KeyDown message message ProtoKeyDown { int32 key = 1; } // KeyUp message message ProtoKeyUp { int32 key = 1; } /* Controller messages */ // ControllerAttach message message ProtoControllerAttach { string id = 1; // One of the following enums: "ps", "xbox" or "switch" int32 session_slot = 2; // Session specific slot number (0-3) string session_id = 3; // Session ID of the client } // ControllerDetach message message ProtoControllerDetach { int32 session_slot = 1; // Session specific slot number (0-3) string session_id = 2; // Session ID of the client } // ControllerButton message message ProtoControllerButton { int32 session_slot = 1; // Session specific slot number (0-3) string session_id = 2; // Session ID of the client int32 button = 3; // Button code (linux input event code) bool pressed = 4; // true if pressed, false if released } // ControllerTriggers message message ProtoControllerTrigger { int32 session_slot = 1; // Session specific slot number (0-3) string session_id = 2; // Session ID of the client int32 trigger = 3; // Trigger number (0 for left, 1 for right) int32 value = 4; // trigger value (-32768 to 32767) } // ControllerSticks message message ProtoControllerStick { int32 session_slot = 1; // Session specific slot number (0-3) string session_id = 2; // Session ID of the client int32 stick = 3; // Stick number (0 for left, 1 for right) int32 x = 4; // X axis value (-32768 to 32767) int32 y = 5; // Y axis value (-32768 to 32767) } // ControllerAxis message message ProtoControllerAxis { int32 session_slot = 1; // Session specific slot number (0-3) string session_id = 2; // Session ID of the client int32 axis = 3; // Axis number (0 for d-pad horizontal, 1 for d-pad vertical) int32 value = 4; // axis value (-1 to 1) } // ControllerRumble message message ProtoControllerRumble { int32 session_slot = 1; // Session specific slot number (0-3) string session_id = 2; // Session ID of the client int32 low_frequency = 3; // Low frequency rumble (0-65535) int32 high_frequency = 4; // High frequency rumble (0-65535) int32 duration = 5; // Duration in milliseconds } /* WebRTC + signaling */ message RTCIceCandidateInit { string candidate = 1; optional uint32 sdpMLineIndex = 2; optional string sdpMid = 3; optional string usernameFragment = 4; } message RTCSessionDescriptionInit { string sdp = 1; string type = 2; } // ProtoICE message message ProtoICE { RTCIceCandidateInit candidate = 1; } // ProtoSDP message message ProtoSDP { RTCSessionDescriptionInit sdp = 1; } // ProtoRaw message message ProtoRaw { string data = 1; } // ProtoClientRequestRoomStream message message ProtoClientRequestRoomStream { string room_name = 1; string session_id = 2; } // ProtoClientDisconnected message message ProtoClientDisconnected { string session_id = 1; repeated int32 controller_slots = 2; } // ProtoServerPushStream message message ProtoServerPushStream { string room_name = 1; }