1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +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)
This commit is contained in:
Fabio Alessandrelli
2017-01-18 12:47:12 +01:00
parent 2fe4ef6699
commit 88a56ba783
18 changed files with 15 additions and 66 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() {
ClassDB::bind_method(_MD("set_ip_type","ip_type"),&TCP_Server::set_ip_type);
ClassDB::bind_method(_MD("listen","port","bind_address"),&TCP_Server::listen,DEFVAL("*"));
ClassDB::bind_method(_MD("is_connection_available"),&TCP_Server::is_connection_available);
ClassDB::bind_method(_MD("take_connection"),&TCP_Server::take_connection);
@@ -62,5 +56,5 @@ void TCP_Server::_bind_methods() {
TCP_Server::TCP_Server()
{
ip_type = IP::TYPE_ANY;
}