You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
IP_Address now handle IPv4 and IPv6 transparently
IP_Address changes: - Converts to and from String transparently while handling IPv4 as IPv6 mapped (::ffff:[IP]) address internally. - Completely remove AddrType enum. - Setting/Getting of ip array is now only possible through dedicated functions (ie. set_ipv4, get_ipv4, set_ipv6, get_ipv6) - Add function to know if the address is a valid IPv4 (for IP implementation and enet)
This commit is contained in:
@@ -141,7 +141,7 @@ void StreamPeerTCPPosix::set_socket(int p_sockfd, IP_Address p_host, int p_port,
|
||||
|
||||
Error StreamPeerTCPPosix::connect(const IP_Address& p_host, uint16_t p_port) {
|
||||
|
||||
ERR_FAIL_COND_V( p_host.type == IP_Address::TYPE_NONE, ERR_INVALID_PARAMETER);
|
||||
ERR_FAIL_COND_V( p_host == IP_Address(), ERR_INVALID_PARAMETER);
|
||||
|
||||
sockfd = _socket_create(ip_type, SOCK_STREAM, IPPROTO_TCP);
|
||||
if (sockfd == -1) {
|
||||
|
||||
Reference in New Issue
Block a user