1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
class Cping_packet
{
friend class Cping_server;
friend class Cping_sender;
friend class Cresolve_server;
private:
Cping_server *parent_server;
unsigned short id;
LARGE_INTEGER ticks;
TCHAR *tszName;
TCHAR *tszAddress;
float ping;
struct in_addr ip;
public:
inline TCHAR *getAddress()
{
return tszAddress;
}
inline TCHAR *getName()
{
return tszName;
}
inline float getPing()
{
return ping;
}
inline unsigned int getIntAddr()
{
return ip.S_un.S_un_b.s_b4 + (ip.S_un.S_un_b.s_b3 << 8) + (ip.S_un.S_un_b.s_b2 << 16) + (ip.S_un.S_un_b.s_b1 << 24);
}
Cping_packet(struct in_addr &s_address, Cping_server *parent);
~ Cping_packet();
void send();
}; |