adapt SockAddr

This commit is contained in:
Michael Davidsaver
2019-10-24 10:49:44 -07:00
parent 84ac6ed091
commit 5892e131b6
3 changed files with 15 additions and 5 deletions
+6
View File
@@ -75,6 +75,12 @@ SockAddr::SockAddr(int af)
throw std::invalid_argument("Unsupported address family");
}
SockAddr::SockAddr(int af, const char *address)
:SockAddr(af)
{
setAddress(address);
}
unsigned short SockAddr::port() const
{
switch(store.sa.sa_family) {