diff options
| author | Fabio Alessandrelli | 2016-12-01 09:01:09 +0100 |
|---|---|---|
| committer | Fabio Alessandrelli | 2017-01-04 00:46:33 +0100 |
| commit | 7ef71b901372eaa046479b8a946d64277fd4bf0c (patch) | |
| tree | 62cf382259f691a9bd13fc88e07f58647d64c508 /core/io/tcp_server.cpp | |
| parent | e8a6cbc8979089839cddecce6f59a053f4416640 (diff) | |
| download | godot-7ef71b901372eaa046479b8a946d64277fd4bf0c.tar.gz godot-7ef71b901372eaa046479b8a946d64277fd4bf0c.tar.zst godot-7ef71b901372eaa046479b8a946d64277fd4bf0c.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); |
