added support for broadcasting to UDP sockets (patch 1740266)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-07-04 21:33:11 +00:00
parent bf511d579f
commit 60edcf4535
14 changed files with 180 additions and 23 deletions

View File

@@ -178,6 +178,11 @@ bool wxIPV4address::IsLocalHost() const
return (Hostname() == wxT("localhost") || IPAddress() == wxT("127.0.0.1"));
}
bool wxIPV4address::BroadcastAddress()
{
return (GAddress_INET_SetBroadcastAddress(m_address) == GSOCK_NOERROR);
}
bool wxIPV4address::AnyAddress()
{
return (GAddress_INET_SetAnyAddress(m_address) == GSOCK_NOERROR);
@@ -275,6 +280,11 @@ bool wxIPV6address::IsLocalHost() const
return (Hostname() == wxT("localhost") || IPAddress() == wxT("127.0.0.1"));
}
bool wxIPV6address::BroadcastAddress()
{
return (GAddress_INET_SetBroadcastAddress(m_address) == GSOCK_NOERROR);
}
bool wxIPV6address::AnyAddress()
{
return (GAddress_INET_SetAnyAddress(m_address) == GSOCK_NOERROR);