From d34f704cc5ceed3efb647c4d7ef25922e17c53e8 Mon Sep 17 00:00:00 2001 From: Seth Call Date: Wed, 7 Aug 2013 10:38:08 -0500 Subject: [PATCH] * adding reconnect related messages to jam-pb --- src/client_container.proto | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/client_container.proto b/src/client_container.proto index 2943c8ac5..cc0f76f16 100644 --- a/src/client_container.proto +++ b/src/client_container.proto @@ -25,6 +25,8 @@ message ClientMessage { FRIEND_REQUEST = 112; FRIEND_REQUEST_ACCEPTED = 113; MUSICIAN_SESSION_JOIN = 114; + MUSICIAN_SESSION_FRESH = 115; + MUSICIAN_SESSION_STALE = 116; TEST_SESSION_MESSAGE = 200; @@ -66,6 +68,8 @@ message ClientMessage { optional FriendRequest friend_request = 112; optional FriendRequestAccepted friend_request_accepted = 113; optional MusicianSessionJoin musician_session_join = 114; + optional MusicianSessionFresh musician_session_fresh = 115; + optional MusicianSessionStale musician_session_stale = 116; // Client-Session messages (to/from) optional TestSessionMessage test_session_message = 200; @@ -96,6 +100,8 @@ message Login { optional string password = 2; // a password optional string token = 3; // a token/cookie from previous successful login attempt or from 'token' field in .music file optional string client_id = 4; // if supplied, the server will accept this client_id as the unique Id of this client instance + optional string reconnect_music_session_id = 5; // if supplied, the server will attempt to log the client into this session (designed for reconnect scenarios while in-session) + } // route_to: client @@ -106,7 +112,8 @@ message LoginAck { optional string client_id = 2; // a new client_id if none is supplied in Login, or just the original client_id echoed back optional string token = 3; // the remember me token. This is useful if you logged in with username/password (otherwise it's just 'token' echoed back) optional int32 heartbeat_interval = 4; // set your heartbeat interval to this value - optional string music_session_id = 5; // users session id if present + optional string music_session_id = 5; // the music session that the user was in very recently (likely due to dropped connection) + optional bool reconnected = 6; // if reconnect_music_session_id is specified, and the server could log the user into that session, then true is returned. } // route_to: server @@ -166,6 +173,24 @@ message MusicianSessionDepart { optional string photo_url = 4; } +// route_to: client: +// sent by server to let the rest of the participants know a client has become active again after going stale +message MusicianSessionFresh { + optional string session_id = 1; // the session ID + optional string user_id = 2; // this is the user_id and can be used for user unicast messages + optional string username = 3; // meant to be a display name + optional string photo_url = 4; +} + +// route_to: client: +// sent by server to let the rest of the participants know a user has gone stale (websocket connection dropped) +message MusicianSessionStale { + optional string session_id = 1; // the session ID + optional string user_id = 2; // this is the user_id and can be used for user unicast messages + optional string username = 3; // meant to be a display name + optional string photo_url = 4; +} + message JoinRequest { optional string join_request_id = 1; optional string username = 2;