diff options
| author | Fabio Alessandrelli | 2016-12-01 09:01:09 +0100 |
|---|---|---|
| committer | Fabio Alessandrelli | 2016-12-09 18:24:59 +0100 |
| commit | a77a0118f6b0d0878a53e2c963d91763b311163d (patch) | |
| tree | 159cbc303043c429cfdbe6f9cd4498bbde15ec46 /core/io/tcp_server.cpp | |
| parent | c18c5013f837ea7d4de2f022d36f84e0abce6439 (diff) | |
| download | godot-a77a0118f6b0d0878a53e2c963d91763b311163d.tar.gz godot-a77a0118f6b0d0878a53e2c963d91763b311163d.tar.zst godot-a77a0118f6b0d0878a53e2c963d91763b311163d.zip | |
Diffstat (limited to 'core/io/tcp_server.cpp')
| -rw-r--r-- | core/io/tcp_server.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/io/tcp_server.cpp b/core/io/tcp_server.cpp index 0dcec8001..5f3f74131 100644 --- a/core/io/tcp_server.cpp +++ b/core/io/tcp_server.cpp @@ -54,8 +54,14 @@ Error TCP_Server::_listen(uint16_t p_port, DVector<String> p_accepted_hosts) { } +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","accepted_hosts"),&TCP_Server::_listen,DEFVAL(DVector<String>())); ObjectTypeDB::bind_method(_MD("is_connection_available"),&TCP_Server::is_connection_available); ObjectTypeDB::bind_method(_MD("take_connection"),&TCP_Server::take_connection); |
