delete local_addr;
SockAddr::SysAddr lsa;
getsockname(priv->handle, reinterpret_cast<sockaddr *>(&lsa.addr), &lsa.size);
- local_addr = SockAddr::from_sys(lsa);
+ local_addr = SockAddr::new_from_sys(lsa);
connected = true;
}
}
- from_addr = SockAddr::from_sys(sa);
+ from_addr = SockAddr::new_from_sys(sa);
return ret;
}
const char *sptr = reinterpret_cast<const char *>(res->ai_addr);
char *dptr = reinterpret_cast<char *>(&sa.addr);
copy(sptr, sptr+res->ai_addrlen, dptr);
- SockAddr *addr = SockAddr::from_sys(sa);
+ SockAddr *addr = SockAddr::new_from_sys(sa);
freeaddrinfo(res);
return addr;
}
namespace Msp {
namespace Net {
-SockAddr *SockAddr::from_sys(const SysAddr &sa)
+SockAddr *SockAddr::new_from_sys(const SysAddr &sa)
{
switch(sa.addr.ss_family)
{
virtual SockAddr *copy() const = 0;
- static SockAddr *from_sys(const SysAddr &);
+ static SockAddr *new_from_sys(const SysAddr &);
virtual SysAddr to_sys() const = 0;
virtual Family get_family() const = 0;
SockAddr::SysAddr sa;
getsockname(priv->handle, reinterpret_cast<sockaddr *>(&sa.addr), &sa.size);
- local_addr = SockAddr::from_sys(sa);
+ local_addr = SockAddr::new_from_sys(sa);
#ifdef WIN32
*priv->event = CreateEvent(0, false, false, 0);
Private new_p;
new_p.handle = ::accept(priv->handle, reinterpret_cast<sockaddr *>(&sa.addr), &sa.size);
- RefPtr<SockAddr> paddr = SockAddr::from_sys(sa);
+ RefPtr<SockAddr> paddr = SockAddr::new_from_sys(sa);
return new StreamSocket(new_p, *paddr);
}
delete local_addr;
SockAddr::SysAddr lsa;
getsockname(priv->handle, reinterpret_cast<sockaddr *>(&lsa.addr), &lsa.size);
- local_addr = SockAddr::from_sys(lsa);
+ local_addr = SockAddr::new_from_sys(lsa);
if(err==0)
{