Skip to content

Commit

Permalink
Use supported protocols for game_id and reconnection token instead of…
Browse files Browse the repository at this point in the history
… headers.

Update lobby_client.cpp
  • Loading branch information
Ughuuu committed Dec 9, 2024
1 parent 313f628 commit 1cc4f82
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions modules/blazium_sdk/lobby/lobby_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,13 @@ bool LobbyClient::connect_to_lobby() {
}
String lobby_url = get_server_url();
String url = lobby_url;
Vector<String> headers;
headers.push_back("GAME_ID: " + game_id);
headers.push_back("RECONNECTION_TOKEN: " + reconnection_token);
_socket->set_handshake_headers(headers);
PackedStringArray protocols;
protocols.push_back("blazium");
protocols.push_back(game_id);
if (reconnection_token != "") {
protocols.push_back(reconnection_token);
}
_socket->set_supported_protocols(protocols);
Error err = _socket->connect_to_url(url);
if (err != OK) {
set_process_internal(false);
Expand Down

0 comments on commit 1cc4f82

Please sign in to comment.