00001 #include "include/SIPPacket.h" 00002 00003 namespace network 00004 { 00005 00006 SIPPacket::SIPPacket() 00007 { 00008 } 00009 00010 00011 SIPPacket::SIPPacket(string asciidata) 00012 { 00013 this->raw_data = asciidata; 00014 size_t posini; 00015 size_t poslast; 00016 posini = 42; 00017 poslast = asciidata.find_first_of("Via"); 00018 status_line = asciidata.substr(posini, poslast - posini - 2); 00019 posini = poslast; 00020 poslast = asciidata.find_first_of("From"); 00021 via = asciidata.substr(posini, poslast - posini - 2); 00022 cout << endl << "STATUS LINE:----->> ##" << status_line.c_str() << "##" << endl << endl; 00023 cout << endl << "VIA:----->> ##" << via.c_str() << "##" << endl << endl; 00024 cout << "ASCIIDATA: $$" << asciidata << "$$" << endl; 00025 } 00026 00027 SIPPacket::~SIPPacket() 00028 { 00029 } 00030 00031 }