CIp::CIp() -> CIp::CIp(const int af=AF_INET)

This is added for CIp(AF_UNSPEC), uninitialized CIp state.
CIp() is same as CIp(AF_INET) to have backward compatibility
(the default value of CIp() is 0.0.0.0 IPv4 address).
This commit is contained in:
SASANO Takayoshi 2021-04-10 16:02:29 +09:00
parent 358911ec68
commit 7ecc62cf42
2 changed files with 3 additions and 3 deletions

View file

@ -31,10 +31,10 @@
////////////////////////////////////////////////////////////////////////////////////////
// constructors
CIp::CIp()
CIp::CIp(const int af)
{
::memset(&m_Addr, 0, m_AddrLen = sizeof(struct sockaddr_in));
m_Addr.ss_family = AF_INET;
m_Addr.ss_family = af;
}
CIp::CIp(const char *sz)

View file

@ -33,7 +33,7 @@ class CIp
{
public:
// constructors
CIp();
CIp(const int af = AF_INET);
//CIp(uint8, uint8, uint8, uint8);
CIp(const struct sockaddr_storage *, socklen_t);
CIp(const char *);