* adding reconnect related messages to jam-pb
This commit is contained in:
parent
6342d5d41f
commit
d34f704cc5
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue