diff --git a/CSFML/include/SFML/Network/IpAddress.h b/CSFML/include/SFML/Network/IpAddress.h index e879b4144..fc2f15d5c 100644 --- a/CSFML/include/SFML/Network/IpAddress.h +++ b/CSFML/include/SFML/Network/IpAddress.h @@ -71,16 +71,6 @@ CSFML_API sfIpAddress sfIpAddress_FromBytes(sfUint8 byte0, sfUint8 byte1, sfUint //////////////////////////////////////////////////////////// CSFML_API sfIpAddress sfIpAddress_FromInteger(sfUint32 address); -//////////////////////////////////////////////////////////// -/// Tell if an address is a valid one -/// -/// \param address : Address to check -/// -/// \return sfTrue if address has a valid syntax -/// -//////////////////////////////////////////////////////////// -CSFML_API sfBool sfIpAddress_IsValid(sfIpAddress address); - //////////////////////////////////////////////////////////// /// Get a string representation of an address /// @@ -129,5 +119,13 @@ CSFML_API sfIpAddress sfIpAddress_GetPublicAddress(float timeout); //////////////////////////////////////////////////////////// CSFML_API sfIpAddress sfIpAddress_LocalHost(); +//////////////////////////////////////////////////////////// +/// Get the empty/invalid address +/// +/// \return Empty object that represents invalid addresses +/// +//////////////////////////////////////////////////////////// +CSFML_API sfIpAddress sfIpAddress_None(); + #endif // SFML_IPADDRESS_H diff --git a/CSFML/src/SFML/Network/IpAddress.cpp b/CSFML/src/SFML/Network/IpAddress.cpp index 1c20e4ee8..cd32a83ee 100644 --- a/CSFML/src/SFML/Network/IpAddress.cpp +++ b/CSFML/src/SFML/Network/IpAddress.cpp @@ -80,15 +80,6 @@ sfIpAddress sfIpAddress_FromInteger(sfUint32 address) } -//////////////////////////////////////////////////////////// -/// Tell if an address is a valid one -//////////////////////////////////////////////////////////// -sfBool sfIpAddress_IsValid(sfIpAddress address) -{ - return ToSFMLAddress(address).IsValid() ? sfTrue : sfFalse; -} - - //////////////////////////////////////////////////////////// /// Get a string representation of an address //////////////////////////////////////////////////////////// @@ -136,3 +127,11 @@ sfIpAddress sfIpAddress_LocalHost() { return FromSFMLAddress(sf::IpAddress::LocalHost); } + +//////////////////////////////////////////////////////////// +/// Get the empty/invalid address +//////////////////////////////////////////////////////////// +sfIpAddress sfIpAddress_None() +{ + return FromSFMLAddress(sf::IpAddress::None); +} diff --git a/CSFML/src/SFML/Network/csfml-network-d.def b/CSFML/src/SFML/Network/csfml-network-d.def index c5c92905d..a0e5e2f58 100644 --- a/CSFML/src/SFML/Network/csfml-network-d.def +++ b/CSFML/src/SFML/Network/csfml-network-d.def @@ -52,12 +52,12 @@ EXPORTS sfIpAddress_FromString sfIpAddress_FromBytes sfIpAddress_FromInteger - sfIpAddress_IsValid sfIpAddress_ToString sfIpAddress_ToInteger sfIpAddress_GetLocalAddress sfIpAddress_GetPublicAddress sfIpAddress_LocalHost + sfIpAddress_None sfSocketTCP_Create sfSocketTCP_Destroy sfSocketTCP_SetBlocking diff --git a/CSFML/src/SFML/Network/csfml-network.def b/CSFML/src/SFML/Network/csfml-network.def index e33b2f635..b0bf894d0 100644 --- a/CSFML/src/SFML/Network/csfml-network.def +++ b/CSFML/src/SFML/Network/csfml-network.def @@ -52,12 +52,12 @@ EXPORTS sfIpAddress_FromString sfIpAddress_FromBytes sfIpAddress_FromInteger - sfIpAddress_IsValid sfIpAddress_ToString sfIpAddress_ToInteger sfIpAddress_GetLocalAddress sfIpAddress_GetPublicAddress sfIpAddress_LocalHost + sfIpAddress_None sfSocketTCP_Create sfSocketTCP_Copy sfSocketTCP_Destroy