Such as:
Code: Select all
IPAddressType(IP.s) ; Type IP (IPv4 or IPv6).
IPToBin(IP.s) ; Convert IP-string (IPv4 or IPv6) in binary form (IPv4 - 4 bytes; IPv6 - 16 bytes).
IPToHostName(IP.s, Type) ; Convert IP-string (IPv4 or IPv6) in the domain name (for example 127.0.0.1 converted to localhost).
HostNameToIP(IP.s, Type) ; Convert a domain name in IP-string (IPv4 or IPv6) (for example localhost converted to 127.0.0.1).
Code: Select all
#PB_Network_IPv4
#PB_Network_IPv6
#PB_Error ; The address contains illegal characters or the address is incorrect.
Function IPToHostName() must convert IP address into a domain name. Argument Type, specifies the type of IP address (IPv4 or IPv6).
Function HostNameToIP() must convert the domain name into an IP address. Argument Type, specifies the type of IP address (IPv4 or IPv6).
And it would be great if the added support for non-blocking sockets. http://www.purebasic.fr/english/viewtop ... 24#p402824