mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
more detail printf for handshake
This commit is contained in:
parent
90874b2b04
commit
dea848610a
@ -230,7 +230,7 @@ std::string HandshakePacket::dump(){
|
||||
printer <<"flag:"<< (int)f<<"\r\n";
|
||||
printer <<"control_type:"<< (int)control_type<<"\r\n";
|
||||
printer <<"sub_type:"<< (int)sub_type<<"\r\n";
|
||||
printer <<"type_specific_info:"<< type_specific_info[0]<<":"<<type_specific_info[1]<<":"<<type_specific_info[2]<<":"<<type_specific_info[3]<<"\r\n";
|
||||
printer <<"type_specific_info:"<< (int)type_specific_info[0]<<":"<<(int)type_specific_info[1]<<":"<<(int)type_specific_info[2]<<":"<<(int)type_specific_info[3]<<"\r\n";
|
||||
printer <<"timestamp:"<< timestamp<<"\r\n";
|
||||
printer <<"dst_socket_id:"<< dst_socket_id<<"\r\n";
|
||||
|
||||
@ -245,7 +245,7 @@ std::string HandshakePacket::dump(){
|
||||
printer <<"syn_cookie:"<< syn_cookie<<"\r\n";
|
||||
printer <<"peer_ip_addr:";
|
||||
for(size_t i=0;i<sizeof(peer_ip_addr);++i){
|
||||
printer<<peer_ip_addr[i]<<":";
|
||||
printer<<(int)peer_ip_addr[i]<<":";
|
||||
}
|
||||
printer<<"\r\n";
|
||||
|
||||
|
@ -118,9 +118,9 @@ public:
|
||||
USERDEFINEDTYPE = 0x7FFF
|
||||
};
|
||||
|
||||
uint32_t sub_type : 16;
|
||||
uint32_t control_type : 15;
|
||||
uint32_t f : 1;
|
||||
uint16_t sub_type;
|
||||
uint16_t control_type;
|
||||
uint8_t f;
|
||||
uint8_t type_specific_info[4];
|
||||
uint32_t timestamp;
|
||||
uint32_t dst_socket_id;
|
||||
|
@ -228,7 +228,10 @@ void SrtTransport::handleHandshakeConclusion(HandshakePacket &pkt, struct sockad
|
||||
|
||||
void SrtTransport::handleHandshake(uint8_t *buf, int len, struct sockaddr_storage *addr) {
|
||||
HandshakePacket pkt;
|
||||
assert(pkt.loadFromData(buf, len));
|
||||
if(!pkt.loadFromData(buf, len)){
|
||||
WarnL<<"is not vaild HandshakePacket";
|
||||
return;
|
||||
}
|
||||
|
||||
if (pkt.handshake_type == HandshakePacket::HS_TYPE_INDUCTION) {
|
||||
handleHandshakeInduction(pkt, addr);
|
||||
|
Loading…
Reference in New Issue
Block a user