aboutsummaryrefslogtreecommitdiff
path: root/dep/src/sockets/Socket.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-17 16:20:24 -0700
committermaximius <none@none>2009-10-17 16:20:24 -0700
commit3f338cc1c328c7280957583b50598292cd8fb64b (patch)
treeca209c2cd024e3902b7844b3224bceff7c5bb570 /dep/src/sockets/Socket.cpp
parente585187b248f48b3c6e9247b49fa07c6565d65e5 (diff)
*Massive cleanup redux.
--HG-- branch : trunk
Diffstat (limited to 'dep/src/sockets/Socket.cpp')
-rw-r--r--dep/src/sockets/Socket.cpp173
1 files changed, 0 insertions, 173 deletions
diff --git a/dep/src/sockets/Socket.cpp b/dep/src/sockets/Socket.cpp
index bf1a73abf6e..f53cd27621e 100644
--- a/dep/src/sockets/Socket.cpp
+++ b/dep/src/sockets/Socket.cpp
@@ -60,13 +60,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace SOCKETS_NAMESPACE {
#endif
-
// statics
#ifdef _WIN32
WSAInitializer Socket::m_winsock_init;
#endif
-
Socket::Socket(ISocketHandler& h)
//:m_flags(0)
:m_handler(h)
@@ -111,7 +109,6 @@ Socket::Socket(ISocketHandler& h)
{
}
-
Socket::~Socket()
{
Handler().Remove(this);
@@ -125,22 +122,18 @@ Socket::~Socket()
}
}
-
void Socket::Init()
{
}
-
void Socket::OnRead()
{
}
-
void Socket::OnWrite()
{
}
-
void Socket::OnException()
{
// %! exception doesn't always mean something bad happened, this code should be reworked
@@ -150,22 +143,18 @@ void Socket::OnException()
SetCloseAndDelete();
}
-
void Socket::OnDelete()
{
}
-
void Socket::OnConnect()
{
}
-
void Socket::OnAccept()
{
}
-
int Socket::Close()
{
if (m_socket == INVALID_SOCKET) // this could happen
@@ -191,7 +180,6 @@ int Socket::Close()
return n;
}
-
SOCKET Socket::CreateSocket(int af,int type, const std::string& protocol)
{
struct protoent *p = NULL;
@@ -232,31 +220,26 @@ SOCKET Socket::CreateSocket(int af,int type, const std::string& protocol)
return s;
}
-
void Socket::Attach(SOCKET s)
{
m_socket = s;
}
-
SOCKET Socket::GetSocket()
{
return m_socket;
}
-
void Socket::SetDeleteByHandler(bool x)
{
m_bDel = x;
}
-
bool Socket::DeleteByHandler()
{
return m_bDel;
}
-
void Socket::SetCloseAndDelete(bool x)
{
if (x != m_bClose)
@@ -270,25 +253,21 @@ void Socket::SetCloseAndDelete(bool x)
}
}
-
bool Socket::CloseAndDelete()
{
return m_bClose;
}
-
void Socket::SetRemoteAddress(SocketAddress& ad) //struct sockaddr* sa, socklen_t l)
{
m_remote_address = ad.GetCopy();
}
-
std::auto_ptr<SocketAddress> Socket::GetRemoteSocketAddress()
{
return m_remote_address -> GetCopy();
}
-
ISocketHandler& Socket::Handler() const
{
#ifdef ENABLE_DETACH
@@ -298,13 +277,11 @@ ISocketHandler& Socket::Handler() const
return m_handler;
}
-
ISocketHandler& Socket::MasterHandler() const
{
return m_handler;
}
-
ipaddr_t Socket::GetRemoteIP4()
{
ipaddr_t l = 0;
@@ -323,7 +300,6 @@ ipaddr_t Socket::GetRemoteIP4()
return l;
}
-
#ifdef ENABLE_IPV6
#ifdef IPPROTO_IPV6
struct in6_addr Socket::GetRemoteIP6()
@@ -347,7 +323,6 @@ struct in6_addr Socket::GetRemoteIP6()
#endif
#endif
-
port_t Socket::GetRemotePort()
{
if (!m_remote_address.get())
@@ -357,7 +332,6 @@ port_t Socket::GetRemotePort()
return m_remote_address -> GetPort();
}
-
std::string Socket::GetRemoteAddress()
{
if (!m_remote_address.get())
@@ -367,7 +341,6 @@ std::string Socket::GetRemoteAddress()
return m_remote_address -> Convert(false);
}
-
std::string Socket::GetRemoteHostname()
{
if (!m_remote_address.get())
@@ -377,7 +350,6 @@ std::string Socket::GetRemoteHostname()
return m_remote_address -> Reverse();
}
-
bool Socket::SetNonblocking(bool bNb)
{
#ifdef _WIN32
@@ -410,7 +382,6 @@ bool Socket::SetNonblocking(bool bNb)
#endif
}
-
bool Socket::SetNonblocking(bool bNb, SOCKET s)
{
#ifdef _WIN32
@@ -443,13 +414,11 @@ bool Socket::SetNonblocking(bool bNb, SOCKET s)
#endif
}
-
void Socket::Set(bool bRead, bool bWrite, bool bException)
{
Handler().Set(m_socket, bRead, bWrite, bException);
}
-
bool Socket::Ready()
{
if (m_socket != INVALID_SOCKET && !CloseAndDelete())
@@ -457,138 +426,115 @@ bool Socket::Ready()
return false;
}
-
void Socket::OnLine(const std::string& )
{
}
-
void Socket::OnConnectFailed()
{
}
-
Socket *Socket::GetParent()
{
return m_parent;
}
-
void Socket::SetParent(Socket *x)
{
m_parent = x;
}
-
port_t Socket::GetPort()
{
Handler().LogError(this, "GetPort", 0, "GetPort only implemented for ListenSocket", LOG_LEVEL_WARNING);
return 0;
}
-
bool Socket::OnConnectRetry()
{
return true;
}
-
#ifdef ENABLE_RECONNECT
void Socket::OnReconnect()
{
}
#endif
-
time_t Socket::Uptime()
{
return time(NULL) - m_tCreate;
}
-
#ifdef ENABLE_IPV6
void Socket::SetIpv6(bool x)
{
m_ipv6 = x;
}
-
bool Socket::IsIpv6()
{
return m_ipv6;
}
#endif
-
void Socket::DisableRead(bool x)
{
m_b_disable_read = x;
}
-
bool Socket::IsDisableRead()
{
return m_b_disable_read;
}
-
void Socket::SendBuf(const char *,size_t,int)
{
}
-
void Socket::Send(const std::string&,int)
{
}
-
void Socket::SetConnected(bool x)
{
m_connected = x;
}
-
bool Socket::IsConnected()
{
return m_connected;
}
-
void Socket::OnDisconnect()
{
}
-
void Socket::SetLost()
{
m_bLost = true;
}
-
bool Socket::Lost()
{
return m_bLost;
}
-
void Socket::SetErasedByHandler(bool x)
{
m_b_erased_by_handler = x;
}
-
bool Socket::ErasedByHandler()
{
return m_b_erased_by_handler;
}
-
time_t Socket::TimeSinceClose()
{
return time(NULL) - m_tClose;
}
-
void Socket::SetClientRemoteAddress(SocketAddress& ad)
{
if (!ad.IsValid())
@@ -598,7 +544,6 @@ void Socket::SetClientRemoteAddress(SocketAddress& ad)
m_client_remote_address = ad.GetCopy();
}
-
std::auto_ptr<SocketAddress> Socket::GetClientRemoteAddress()
{
if (!m_client_remote_address.get())
@@ -608,83 +553,69 @@ std::auto_ptr<SocketAddress> Socket::GetClientRemoteAddress()
return m_client_remote_address -> GetCopy();
}
-
uint64_t Socket::GetBytesSent(bool)
{
return 0;
}
-
uint64_t Socket::GetBytesReceived(bool)
{
return 0;
}
-
#ifdef HAVE_OPENSSL
void Socket::OnSSLConnect()
{
}
-
void Socket::OnSSLAccept()
{
}
-
bool Socket::SSLNegotiate()
{
return false;
}
-
bool Socket::IsSSL()
{
return m_b_enable_ssl;
}
-
void Socket::EnableSSL(bool x)
{
m_b_enable_ssl = x;
}
-
bool Socket::IsSSLNegotiate()
{
return m_b_ssl;
}
-
void Socket::SetSSLNegotiate(bool x)
{
m_b_ssl = x;
}
-
bool Socket::IsSSLServer()
{
return m_b_ssl_server;
}
-
void Socket::SetSSLServer(bool x)
{
m_b_ssl_server = x;
}
-
void Socket::OnSSLConnectFailed()
{
}
-
void Socket::OnSSLAcceptFailed()
{
}
#endif // HAVE_OPENSSL
-
#ifdef ENABLE_POOL
void Socket::CopyConnection(Socket *sock)
{
@@ -699,127 +630,106 @@ void Socket::CopyConnection(Socket *sock)
SetRemoteAddress( *sock -> GetRemoteSocketAddress() );
}
-
void Socket::SetIsClient()
{
m_bClient = true;
}
-
void Socket::SetSocketType(int x)
{
m_socket_type = x;
}
-
int Socket::GetSocketType()
{
return m_socket_type;
}
-
void Socket::SetSocketProtocol(const std::string& x)
{
m_socket_protocol = x;
}
-
const std::string& Socket::GetSocketProtocol()
{
return m_socket_protocol;
}
-
void Socket::SetRetain()
{
if (m_bClient) m_bRetain = true;
}
-
bool Socket::Retain()
{
return m_bRetain;
}
-
#endif // ENABLE_POOL
-
#ifdef ENABLE_SOCKS4
void Socket::OnSocks4Connect()
{
Handler().LogError(this, "OnSocks4Connect", 0, "Use with TcpSocket only");
}
-
void Socket::OnSocks4ConnectFailed()
{
Handler().LogError(this, "OnSocks4ConnectFailed", 0, "Use with TcpSocket only");
}
-
bool Socket::OnSocks4Read()
{
Handler().LogError(this, "OnSocks4Read", 0, "Use with TcpSocket only");
return true;
}
-
void Socket::SetSocks4Host(const std::string& host)
{
Utility::u2ip(host, m_socks4_host);
}
-
bool Socket::Socks4()
{
return m_bSocks4;
}
-
void Socket::SetSocks4(bool x)
{
m_bSocks4 = x;
}
-
void Socket::SetSocks4Host(ipaddr_t a)
{
m_socks4_host = a;
}
-
void Socket::SetSocks4Port(port_t p)
{
m_socks4_port = p;
}
-
void Socket::SetSocks4Userid(const std::string& x)
{
m_socks4_userid = x;
}
-
ipaddr_t Socket::GetSocks4Host()
{
return m_socks4_host;
}
-
port_t Socket::GetSocks4Port()
{
return m_socks4_port;
}
-
const std::string& Socket::GetSocks4Userid()
{
return m_socks4_userid;
}
#endif // ENABLE_SOCKS4
-
#ifdef ENABLE_DETACH
bool Socket::Detach()
{
@@ -833,7 +743,6 @@ bool Socket::Detach()
return true;
}
-
void Socket::DetachSocket()
{
SetDetached();
@@ -841,43 +750,36 @@ void Socket::DetachSocket()
m_pThread -> SetRelease(true);
}
-
void Socket::OnDetached()
{
}
-
void Socket::SetDetach(bool x)
{
Handler().AddList(m_socket, LIST_DETACH, x);
m_detach = x;
}
-
bool Socket::IsDetach()
{
return m_detach;
}
-
void Socket::SetDetached(bool x)
{
m_detached = x;
}
-
const bool Socket::IsDetached() const
{
return m_detached;
}
-
void Socket::SetSlaveHandler(ISocketHandler *p)
{
m_slave_handler = p;
}
-
Socket::SocketThread::SocketThread(Socket *p)
:Thread(false)
,m_socket(p)
@@ -885,7 +787,6 @@ Socket::SocketThread::SocketThread(Socket *p)
// Creator will release
}
-
Socket::SocketThread::~SocketThread()
{
if (IsRunning())
@@ -900,7 +801,6 @@ Socket::SocketThread::~SocketThread()
}
}
-
void Socket::SocketThread::Run()
{
SocketHandler h;
@@ -919,14 +819,12 @@ void Socket::SocketThread::Run()
}
#endif // ENABLE_DETACH
-
#ifdef ENABLE_RESOLVER
int Socket::Resolve(const std::string& host,port_t port)
{
return Handler().Resolve(this, host, port);
}
-
#ifdef ENABLE_IPV6
int Socket::Resolve6(const std::string& host,port_t port)
{
@@ -934,13 +832,11 @@ int Socket::Resolve6(const std::string& host,port_t port)
}
#endif
-
int Socket::Resolve(ipaddr_t a)
{
return Handler().Resolve(this, a);
}
-
#ifdef ENABLE_IPV6
int Socket::Resolve(in6_addr& a)
{
@@ -948,33 +844,27 @@ int Socket::Resolve(in6_addr& a)
}
#endif
-
void Socket::OnResolved(int,ipaddr_t,port_t)
{
}
-
#ifdef ENABLE_IPV6
void Socket::OnResolved(int,in6_addr&,port_t)
{
}
#endif
-
void Socket::OnReverseResolved(int,const std::string&)
{
}
-
void Socket::OnResolveFailed(int)
{
}
#endif // ENABLE_RESOLVER
-
/* IP options */
-
bool Socket::SetIpOptions(const void *p, socklen_t len)
{
#ifdef IP_OPTIONS
@@ -990,7 +880,6 @@ bool Socket::SetIpOptions(const void *p, socklen_t len)
#endif
}
-
#ifdef IP_PKTINFO
bool Socket::SetIpPktinfo(bool x)
{
@@ -1004,7 +893,6 @@ bool Socket::SetIpPktinfo(bool x)
}
#endif
-
#ifdef IP_RECVTOS
bool Socket::SetIpRecvTOS(bool x)
{
@@ -1018,7 +906,6 @@ bool Socket::SetIpRecvTOS(bool x)
}
#endif
-
#ifdef IP_RECVTTL
bool Socket::SetIpRecvTTL(bool x)
{
@@ -1032,7 +919,6 @@ bool Socket::SetIpRecvTTL(bool x)
}
#endif
-
#ifdef IP_RECVOPTS
bool Socket::SetIpRecvopts(bool x)
{
@@ -1046,7 +932,6 @@ bool Socket::SetIpRecvopts(bool x)
}
#endif
-
#ifdef IP_RETOPTS
bool Socket::SetIpRetopts(bool x)
{
@@ -1060,7 +945,6 @@ bool Socket::SetIpRetopts(bool x)
}
#endif
-
bool Socket::SetIpTOS(unsigned char tos)
{
#ifdef IP_TOS
@@ -1076,7 +960,6 @@ bool Socket::SetIpTOS(unsigned char tos)
#endif
}
-
unsigned char Socket::IpTOS()
{
unsigned char tos = 0;
@@ -1092,7 +975,6 @@ unsigned char Socket::IpTOS()
return tos;
}
-
bool Socket::SetIpTTL(int ttl)
{
#ifdef IP_TTL
@@ -1108,7 +990,6 @@ bool Socket::SetIpTTL(int ttl)
#endif
}
-
int Socket::IpTTL()
{
int ttl = 0;
@@ -1124,7 +1005,6 @@ int Socket::IpTTL()
return ttl;
}
-
bool Socket::SetIpHdrincl(bool x)
{
#ifdef IP_HDRINCL
@@ -1141,7 +1021,6 @@ bool Socket::SetIpHdrincl(bool x)
#endif
}
-
#ifdef IP_RECVERR
bool Socket::SetIpRecverr(bool x)
{
@@ -1155,7 +1034,6 @@ bool Socket::SetIpRecverr(bool x)
}
#endif
-
#ifdef IP_MTU_DISCOVER
bool Socket::SetIpMtudiscover(bool x)
{
@@ -1169,7 +1047,6 @@ bool Socket::SetIpMtudiscover(bool x)
}
#endif
-
#ifdef IP_MTU
int Socket::IpMtu()
{
@@ -1183,7 +1060,6 @@ int Socket::IpMtu()
}
#endif
-
#ifdef IP_ROUTER_ALERT
bool Socket::SetIpRouterAlert(bool x)
{
@@ -1197,7 +1073,6 @@ bool Socket::SetIpRouterAlert(bool x)
}
#endif
-
bool Socket::SetIpMulticastTTL(int ttl)
{
#ifdef IP_MULTICAST_TTL
@@ -1213,7 +1088,6 @@ bool Socket::SetIpMulticastTTL(int ttl)
#endif
}
-
int Socket::IpMulticastTTL()
{
int ttl = 0;
@@ -1229,7 +1103,6 @@ int Socket::IpMulticastTTL()
return ttl;
}
-
bool Socket::SetMulticastLoop(bool x)
{
#ifdef IP_MULTICAST_LOOP
@@ -1246,7 +1119,6 @@ bool Socket::SetMulticastLoop(bool x)
#endif
}
-
#ifdef LINUX
bool Socket::IpAddMembership(struct ip_mreqn& ref)
{
@@ -1264,7 +1136,6 @@ bool Socket::IpAddMembership(struct ip_mreqn& ref)
}
#endif
-
bool Socket::IpAddMembership(struct ip_mreq& ref)
{
#ifdef IP_ADD_MEMBERSHIP
@@ -1280,7 +1151,6 @@ bool Socket::IpAddMembership(struct ip_mreq& ref)
#endif
}
-
#ifdef LINUX
bool Socket::IpDropMembership(struct ip_mreqn& ref)
{
@@ -1298,7 +1168,6 @@ bool Socket::IpDropMembership(struct ip_mreqn& ref)
}
#endif
-
bool Socket::IpDropMembership(struct ip_mreq& ref)
{
#ifdef IP_DROP_MEMBERSHIP
@@ -1314,10 +1183,8 @@ bool Socket::IpDropMembership(struct ip_mreq& ref)
#endif
}
-
/* SOCKET options */
-
bool Socket::SetSoReuseaddr(bool x)
{
#ifdef SO_REUSEADDR
@@ -1334,7 +1201,6 @@ bool Socket::SetSoReuseaddr(bool x)
#endif
}
-
bool Socket::SetSoKeepalive(bool x)
{
#ifdef SO_KEEPALIVE
@@ -1351,7 +1217,6 @@ bool Socket::SetSoKeepalive(bool x)
#endif
}
-
#ifdef SO_NOSIGPIPE
bool Socket::SetSoNosigpipe(bool x)
{
@@ -1365,7 +1230,6 @@ bool Socket::SetSoNosigpipe(bool x)
}
#endif
-
bool Socket::SoAcceptconn()
{
int value = 0;
@@ -1381,7 +1245,6 @@ bool Socket::SoAcceptconn()
return value ? true : false;
}
-
#ifdef SO_BSDCOMPAT
bool Socket::SetSoBsdcompat(bool x)
{
@@ -1395,7 +1258,6 @@ bool Socket::SetSoBsdcompat(bool x)
}
#endif
-
#ifdef SO_BINDTODEVICE
bool Socket::SetSoBindtodevice(const std::string& intf)
{
@@ -1408,7 +1270,6 @@ bool Socket::SetSoBindtodevice(const std::string& intf)
}
#endif
-
bool Socket::SetSoBroadcast(bool x)
{
#ifdef SO_BROADCAST
@@ -1425,7 +1286,6 @@ bool Socket::SetSoBroadcast(bool x)
#endif
}
-
bool Socket::SetSoDebug(bool x)
{
#ifdef SO_DEBUG
@@ -1442,7 +1302,6 @@ bool Socket::SetSoDebug(bool x)
#endif
}
-
int Socket::SoError()
{
int value = 0;
@@ -1458,7 +1317,6 @@ int Socket::SoError()
return value;
}
-
bool Socket::SetSoDontroute(bool x)
{
#ifdef SO_DONTROUTE
@@ -1475,7 +1333,6 @@ bool Socket::SetSoDontroute(bool x)
#endif
}
-
bool Socket::SetSoLinger(int onoff, int linger)
{
#ifdef SO_LINGER
@@ -1494,7 +1351,6 @@ bool Socket::SetSoLinger(int onoff, int linger)
#endif
}
-
bool Socket::SetSoOobinline(bool x)
{
#ifdef SO_OOBINLINE
@@ -1511,7 +1367,6 @@ bool Socket::SetSoOobinline(bool x)
#endif
}
-
#ifdef SO_PASSCRED
bool Socket::SetSoPasscred(bool x)
{
@@ -1525,7 +1380,6 @@ bool Socket::SetSoPasscred(bool x)
}
#endif
-
#ifdef SO_PEERCRED
bool Socket::SoPeercred(struct ucred& ucr)
{
@@ -1538,7 +1392,6 @@ bool Socket::SoPeercred(struct ucred& ucr)
}
#endif
-
#ifdef SO_PRIORITY
bool Socket::SetSoPriority(int x)
{
@@ -1551,7 +1404,6 @@ bool Socket::SetSoPriority(int x)
}
#endif
-
bool Socket::SetSoRcvlowat(int x)
{
#ifdef SO_RCVLOWAT
@@ -1567,7 +1419,6 @@ bool Socket::SetSoRcvlowat(int x)
#endif
}
-
bool Socket::SetSoSndlowat(int x)
{
#ifdef SO_SNDLOWAT
@@ -1583,7 +1434,6 @@ bool Socket::SetSoSndlowat(int x)
#endif
}
-
bool Socket::SetSoRcvtimeo(struct timeval& tv)
{
#ifdef SO_RCVTIMEO
@@ -1599,7 +1449,6 @@ bool Socket::SetSoRcvtimeo(struct timeval& tv)
#endif
}
-
bool Socket::SetSoSndtimeo(struct timeval& tv)
{
#ifdef SO_SNDTIMEO
@@ -1615,7 +1464,6 @@ bool Socket::SetSoSndtimeo(struct timeval& tv)
#endif
}
-
bool Socket::SetSoRcvbuf(int x)
{
#ifdef SO_RCVBUF
@@ -1631,7 +1479,6 @@ bool Socket::SetSoRcvbuf(int x)
#endif
}
-
int Socket::SoRcvbuf()
{
int value = 0;
@@ -1647,7 +1494,6 @@ int Socket::SoRcvbuf()
return value;
}
-
#ifdef SO_RCVBUFFORCE
bool Socket::SetSoRcvbufforce(int x)
{
@@ -1660,7 +1506,6 @@ bool Socket::SetSoRcvbufforce(int x)
}
#endif
-
bool Socket::SetSoSndbuf(int x)
{
#ifdef SO_SNDBUF
@@ -1676,7 +1521,6 @@ bool Socket::SetSoSndbuf(int x)
#endif
}
-
int Socket::SoSndbuf()
{
int value = 0;
@@ -1692,7 +1536,6 @@ int Socket::SoSndbuf()
return value;
}
-
#ifdef SO_SNDBUFFORCE
bool Socket::SetSoSndbufforce(int x)
{
@@ -1705,7 +1548,6 @@ bool Socket::SetSoSndbufforce(int x)
}
#endif
-
#ifdef SO_TIMESTAMP
bool Socket::SetSoTimestamp(bool x)
{
@@ -1719,7 +1561,6 @@ bool Socket::SetSoTimestamp(bool x)
}
#endif
-
int Socket::SoType()
{
int value = 0;
@@ -1735,31 +1576,26 @@ int Socket::SoType()
return value;
}
-
#ifdef ENABLE_TRIGGERS
void Socket::Subscribe(int id)
{
Handler().Subscribe(id, this);
}
-
void Socket::Unsubscribe(int id)
{
Handler().Unsubscribe(id, this);
}
-
void Socket::OnTrigger(int, const TriggerData&)
{
}
-
void Socket::OnCancelled(int)
{
}
#endif
-
void Socket::SetTimeout(time_t secs)
{
if (!secs)
@@ -1772,17 +1608,14 @@ void Socket::SetTimeout(time_t secs)
m_timeout_limit = secs;
}
-
void Socket::OnTimeout()
{
}
-
void Socket::OnConnectTimeout()
{
}
-
bool Socket::Timeout(time_t tnow)
{
if (tnow - m_timeout_start > m_timeout_limit)
@@ -1790,7 +1623,6 @@ bool Socket::Timeout(time_t tnow)
return false;
}
-
/** Returns local port number for bound socket file descriptor. */
port_t Socket::GetSockPort()
{
@@ -1813,7 +1645,6 @@ port_t Socket::GetSockPort()
return ntohs(sa.sin_port);
}
-
/** Returns local ipv4 address for bound socket file descriptor. */
ipaddr_t Socket::GetSockIP4()
{
@@ -1834,7 +1665,6 @@ ipaddr_t Socket::GetSockIP4()
return a;
}
-
/** Returns local ipv4 address as text for bound socket file descriptor. */
std::string Socket::GetSockAddress()
{
@@ -1854,7 +1684,6 @@ std::string Socket::GetSockAddress()
return addr.Convert();
}
-
#ifdef ENABLE_IPV6
#ifdef IPPROTO_IPV6
/** Returns local ipv6 address for bound socket file descriptor. */
@@ -1873,7 +1702,6 @@ struct in6_addr Socket::GetSockIP6()
return a;
}
-
/** Returns local ipv6 address as text for bound socket file descriptor. */
std::string Socket::GetSockAddress6()
{
@@ -1891,7 +1719,6 @@ std::string Socket::GetSockAddress6()
#endif
#endif
-
#ifdef SOCKETS_NAMESPACE
}
#endif