ServerCore/IPAddress.h
2019-02-07 13:28:21 -08:00

27 lines
565 B
C++

#ifndef __IPAddress_h__
#define __IPAddress_h__
#include "includes"
#include "Object.h"
namespace core {
class IPAddress : public Object {
public:
IPAddress();
~IPAddress();
struct sockaddr_in address;
socklen_t addressLength;
std::string getClientAddress(); ///<Get the client network address as xxx.xxx.xxx.xxx.
std::string getClientAddressAndPort(); ///<Get the client network address and port as xxx.xxx.xxx.xxx:ppppp.
int getClientPort(); ///<Get the client network port number.
};
}
#endif