1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +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:
Fabio Alessandrelli
2017-01-18 12:47:12 +01:00
parent 0b9684a085
commit d9525082fe
18 changed files with 13 additions and 65 deletions

View File

@@ -44,14 +44,8 @@ TCP_Server *TCP_Server::create() {
return _create();
}
void TCP_Server::set_ip_type(IP::Type p_type) {
stop();
ip_type = p_type;
}
void TCP_Server::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_ip_type", "ip_type"), &TCP_Server::set_ip_type);
ObjectTypeDB::bind_method(_MD("listen", "port", "bind_address"), &TCP_Server::listen, DEFVAL("*"));
ObjectTypeDB::bind_method(_MD("is_connection_available"), &TCP_Server::is_connection_available);
ObjectTypeDB::bind_method(_MD("take_connection"), &TCP_Server::take_connection);
@@ -59,5 +53,4 @@ void TCP_Server::_bind_methods() {
}
TCP_Server::TCP_Server() {
ip_type = IP::TYPE_ANY;
}