diff --git a/src/client_container.proto b/src/client_container.proto index e4a3e0375..7ab8f7ede 100644 --- a/src/client_container.proto +++ b/src/client_container.proto @@ -16,8 +16,10 @@ message ClientMessage { USER_JOINED_JAM_SESSION = 104; LEAVE_JAM_SESSION = 105; LEAVE_JAM_SESSION_ACK = 106; + HEARTBEAT = 107; SERVER_GENERIC_ERROR = 1000; + SERVER_REJECTION_ERROR = 1001; } // Identifies which inner message is filled in @@ -26,19 +28,21 @@ message ClientMessage { // One of the following messages can be populated // Client-Server messages (to/from) - optional Login login = 100; // to server - optional LoginAck login_ack = 101; // from server - optional LoginJamSession login_jam_session = 102; // to server - optional LoginJamSessionAck login_jam_session_ack = 103; // from server - optional UserJoinedJamSession user_joined_jam_session = 104; // from server to all members - optional LeaveJamSession leave_jam_session = 105; - optional LeaveJamSessionAck leave_jam_session_ack = 106; + optional Login login = 100; // to server + optional LoginAck login_ack = 101; // from server + optional LoginJamSession login_jam_session = 102; // to server + optional LoginJamSessionAck login_jam_session_ack = 103; // from server + optional UserJoinedJamSession user_joined_jam_session = 104; // from server to all members + optional LeaveJamSession leave_jam_session = 105; + optional LeaveJamSessionAck leave_jam_session_ack = 106; + optional Heartbeat heartbeat = 107; // Client-Session messages (to/from) - // Server-to-Client errors + // Server-to-Client errors optional ServerGenericError server_generic_error = 1000; + optional ServerRejectionError server_rejection_error = 1001; } // target: server @@ -97,9 +101,24 @@ message UserJoinedJamSession { optional string username = 2; // meant to be a display name } +// target: server +// send from client to server periodically to know if session is gone +message Heartbeat { + +} + // target: client +// this indicates unhandled error on server // if you receive this, your connection will close after. // but gives the client a chance to know why. message ServerGenericError { optional string error_msg = 1; } + +// target: client +// this indicates the client did something wrong, and the server is mad enough to close connection. +// if you receive this, your connection will close after. +// but gives the client a chance to know why. +message ServerRejectionError { + optional string error_msg = 1; +}