You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Remove set_ip_type from network classes (no longer needed)
- TCP:
- `listen` bind to wildcard "*" -> dual stack socket
- `listen` bind to address -> socket from address type
- `connect` -> resolve using best protocol (UNSPEC), socket from address type
- UDP:
- `listen` bind to wildcard "*" -> dual stack socket
- `listen` bind to address -> socket from address type
- `put_packet`/`put_var` -> resolve using TYPE_ANY (UNSPEC), socket from address type
(to change socket type you must first call `close` it)
(cherry picked from commit 88a56ba783)
This commit is contained in:
@@ -74,7 +74,7 @@ Error TCPServerPosix::listen(uint16_t p_port, const IP_Address p_bind_address) {
|
||||
ERR_FAIL_COND_V(!p_bind_address.is_valid() && !p_bind_address.is_wildcard(), ERR_INVALID_PARAMETER);
|
||||
|
||||
int sockfd;
|
||||
sock_type = ip_type;
|
||||
sock_type = IP::TYPE_ANY;
|
||||
|
||||
// If the bind address is valid use its type as the socket type
|
||||
if (p_bind_address.is_valid())
|
||||
@@ -182,7 +182,6 @@ void TCPServerPosix::stop() {
|
||||
TCPServerPosix::TCPServerPosix() {
|
||||
|
||||
listen_sockfd = -1;
|
||||
ip_type = IP::TYPE_ANY;
|
||||
sock_type = IP::TYPE_NONE;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user