#include <SFML/Config.h>
Go to the source code of this file.
Data Structures | |
struct | sfIPAddress |
sfIPAddress provides easy manipulation of IP v4 addresses More... | |
Functions | |
CSFML_API sfIPAddress | sfIPAddress_FromString (const char *String) |
Construct an address from a string. | |
CSFML_API sfIPAddress | sfIPAddress_FromBytes (sfUint8 Byte0, sfUint8 Byte1, sfUint8 Byte2, sfUint8 Byte3) |
Construct an address from 4 bytes. | |
CSFML_API sfIPAddress | sfIPAddress_FromInteger (sfUint32 Address) |
Construct the address from a 32-bits integer. | |
CSFML_API sfBool | sfIPAddress_IsValid (sfIPAddress Address) |
Tell if an address is a valid one. | |
CSFML_API void | sfIPAddress_ToString (sfIPAddress Address, char *String) |
Get a string representation of an address. | |
CSFML_API sfUint32 | sfIPAddress_ToInteger (sfIPAddress Address) |
Get an integer representation of the address. | |
CSFML_API sfIPAddress | sfIPAddress_GetLocalAddress () |
Get the computer's local IP address (from the LAN point of view). | |
CSFML_API sfIPAddress | sfIPAddress_GetPublicAddress (float Timeout) |
Get the computer's public IP address (from the web point of view). | |
CSFML_API sfIPAddress | sfIPAddress_LocalHost () |
Get the computer's loopback address. |
CSFML_API sfIPAddress sfIPAddress_FromBytes | ( | sfUint8 | Byte0, | |
sfUint8 | Byte1, | |||
sfUint8 | Byte2, | |||
sfUint8 | Byte3 | |||
) |
Construct an address from 4 bytes.
Byte0 | : First byte of the address | |
Byte1 | : Second byte of the address | |
Byte2 | : Third byte of the address | |
Byte3 | : Fourth byte of the address |
CSFML_API sfIPAddress sfIPAddress_FromInteger | ( | sfUint32 | Address | ) |
Construct the address from a 32-bits integer.
Address | : 4 bytes of the address packed into a 32-bits integer |
CSFML_API sfIPAddress sfIPAddress_FromString | ( | const char * | String | ) |
Construct an address from a string.
String | : IP address ("xxx.xxx.xxx.xxx") or network name |
CSFML_API sfIPAddress sfIPAddress_GetLocalAddress | ( | ) |
Get the computer's local IP address (from the LAN point of view).
CSFML_API sfIPAddress sfIPAddress_GetPublicAddress | ( | float | Timeout | ) |
Get the computer's public IP address (from the web point of view).
The only way to get a public address is to ask it to a distant website ; as a consequence, this function may be very slow -- use it as few as possible !
Timeout | : Maximum time to wait, in seconds (use 0 for no timeout) |
CSFML_API sfBool sfIPAddress_IsValid | ( | sfIPAddress | Address | ) |
Tell if an address is a valid one.
Address | : Address to check |
CSFML_API sfIPAddress sfIPAddress_LocalHost | ( | ) |
Get the computer's loopback address.
CSFML_API sfUint32 sfIPAddress_ToInteger | ( | sfIPAddress | Address | ) |
Get an integer representation of the address.
Address | : Address to convert |
CSFML_API void sfIPAddress_ToString | ( | sfIPAddress | Address, | |
char * | String | |||
) |
Get a string representation of an address.
Address | : Address to convert | |
String | : Char array to fill (size must be >= 16) |