mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
make code easy, wrap udp remux socket
This commit is contained in:
parent
b730458d51
commit
c62901a3ac
11 changed files with 245 additions and 294 deletions
|
@ -129,6 +129,7 @@ srs_error_t SrsStunPacket::decode(const char* buf, const int nb_buf)
|
|||
switch (type) {
|
||||
// FIXME: enum
|
||||
case 6: {
|
||||
username = val;
|
||||
size_t p = val.find(":");
|
||||
if (p != string::npos) {
|
||||
local_ufrag = val.substr(0, p);
|
||||
|
|
|
@ -70,6 +70,7 @@ class SrsStunPacket
|
|||
{
|
||||
private:
|
||||
uint16_t message_type;
|
||||
std::string username;
|
||||
std::string local_ufrag;
|
||||
std::string remote_ufrag;
|
||||
std::string transcation_id;
|
||||
|
@ -83,6 +84,7 @@ public:
|
|||
bool is_binding_response() const { return message_type == BindingResponse; }
|
||||
|
||||
uint16_t get_message_type() const { return message_type; }
|
||||
std::string get_username() const { return username; }
|
||||
std::string get_local_ufrag() const { return local_ufrag; }
|
||||
std::string get_remote_ufrag() const { return remote_ufrag; }
|
||||
std::string get_transcation_id() const { return transcation_id; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue