From 157dde1021ab7f56d5fa68d91970bc35d8c2d3b8 Mon Sep 17 00:00:00 2001 From: niansa Date: Wed, 11 May 2022 11:24:54 +0200 Subject: [PATCH] Added protocol documentation --- generic.txt => doc/calls.txt | 11 +++++++---- doc/protocol.txt | 5 +++++ 2 files changed, 12 insertions(+), 4 deletions(-) rename generic.txt => doc/calls.txt (84%) create mode 100644 doc/protocol.txt diff --git a/generic.txt b/doc/calls.txt similarity index 84% rename from generic.txt rename to doc/calls.txt index b834d06..3ac426c 100644 --- a/generic.txt +++ b/doc/calls.txt @@ -1,11 +1,14 @@ +Operation(Parameter) -> Callback + + Server -void Disconnect() // client closes connection -void Error(Error) -void OK() +Disconnect() // client closes connection +Error(Error) +OK() SimpleAuth(SimpleAuth) -> UserInfoSync // client wants to authenticate anonymously RobotUpdate(Robot) -> RobotUpdate // client wants to change robot -void RoomInfoSync(RoomInfo) <- TODO // client wants to change room info +RoomInfoSync(RoomInfo) <- TODO // client wants to change room info MakeRoom() -> RoomInfoSync // client creates a room JoinRoom(???) -> RoomInfoSync // client joins specific room JoinRandomRoom() -> RoomInfoSync // client joins random room diff --git a/doc/protocol.txt b/doc/protocol.txt new file mode 100644 index 0000000..6f2be41 --- /dev/null +++ b/doc/protocol.txt @@ -0,0 +1,5 @@ +Packet { + uint16 Size; + Protobuf Operation; + Variadic Protobuf Parameter; +}