| 1 |
bearsoft |
1.1 |
#include "PacketInfo.h"
|
| 2 |
|
|
|
| 3 |
|
|
PacketInfo::PacketInfo(char *iIP, int iPort, int iSocket, const String &iRequest, const String &iFilePath, const String &iProtocolType)
|
| 4 |
|
|
{
|
| 5 |
|
|
ip=new String(iIP);
|
| 6 |
|
|
port=new String(iPort);
|
| 7 |
|
|
request = new String(iRequest);
|
| 8 |
|
|
filePath = new String(iFilePath);
|
| 9 |
|
|
protocolType = new String(iProtocolType);
|
| 10 |
|
|
socket=iSocket;
|
| 11 |
|
|
inUse=false;
|
| 12 |
|
|
}
|
| 13 |
|
|
|
| 14 |
|
|
PacketInfo::PacketInfo()
|
| 15 |
|
|
{
|
| 16 |
|
|
ip=new String();
|
| 17 |
|
|
port=new String();
|
| 18 |
|
|
request=new String();
|
| 19 |
|
|
filePath= new String();
|
| 20 |
|
|
protocolType=new String();
|
| 21 |
|
|
socket=0;
|
| 22 |
|
|
inUse=false;
|
| 23 |
|
|
}
|
| 24 |
|
|
|
| 25 |
|
|
PacketInfo::~PacketInfo()
|
| 26 |
|
|
{
|
| 27 |
|
|
if (ip!=null)
|
| 28 |
|
|
{
|
| 29 |
|
|
delete ip;
|
| 30 |
|
|
}
|
| 31 |
|
|
|
| 32 |
|
|
if (port!=null)
|
| 33 |
|
|
{
|
| 34 |
|
|
delete port;
|
| 35 |
|
|
}
|
| 36 |
|
|
|
| 37 |
|
|
if (request!=null)
|
| 38 |
|
|
{
|
| 39 |
|
|
delete request;
|
| 40 |
|
|
}
|
| 41 |
|
|
|
| 42 |
|
|
if (filePath!=null)
|
| 43 |
|
|
{
|
| 44 |
|
|
delete filePath;
|
| 45 |
|
|
}
|
| 46 |
|
|
|
| 47 |
|
|
if (protocolType!=null)
|
| 48 |
|
|
{
|
| 49 |
|
|
delete protocolType;
|
| 50 |
|
|
}
|
| 51 |
|
|
|
| 52 |
|
|
}
|
| 53 |
|
|
|