[feat] add Login() private method which uses to check/request use_id when websocket opened

This commit is contained in:
dijunkun
2024-08-08 15:13:38 +08:00
parent dd8ab05d0f
commit a308094fbd
2 changed files with 41 additions and 9 deletions

View File

@@ -72,6 +72,8 @@ class PeerConnection {
int SendUserData(const char *data, size_t size);
private:
int Login();
int CreateVideoCodec(bool hardware_acceleration);
int CreateAudioCodec();
@@ -97,7 +99,7 @@ class PeerConnection {
int turn_server_port_ = 0;
bool hardware_acceleration_ = false;
bool av1_encoding_ = false;
bool trickle_ice_ = true;
bool trickle_ice_ = false;
TraversalMode mode_ = TraversalMode::P2P;
private:
@@ -108,6 +110,7 @@ class PeerConnection {
std::string user_id_ = "";
std::string transmission_id_ = "";
std::vector<std::string> user_id_list_;
WsStatus ws_status_ = WsStatus::WsClosed;
SignalStatus signal_status_ = SignalStatus::SignalClosed;
std::mutex signal_status_mutex_;
std::atomic<bool> leave_{false};