Use config to declare signal/stun server info

This commit is contained in:
dijunkun
2023-07-18 16:58:53 +08:00
parent ea9ffbd6d8
commit 03cb767f1f
16 changed files with 830 additions and 34 deletions

View File

@@ -1,11 +1,13 @@
#ifndef _ICE_AGENT_H_
#define _ICE_AGENT_H_
#include <iostream>
#include "juice/juice.h"
class IceAgent {
public:
IceAgent();
IceAgent(std::string& ip, uint16_t port);
~IceAgent();
int CreateIceAgent(juice_cb_state_changed_t on_state_changed,
@@ -34,6 +36,8 @@ class IceAgent {
int Send(const char* data, size_t size);
private:
std::string ip_ = "";
uint16_t port_ = 0;
juice_agent_t* agent_ = nullptr;
char local_sdp_[JUICE_MAX_SDP_STRING_LEN];
juice_state_t state_;