1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Allow setting ip_type for TCP/UDP and HTTP classes

This commit is contained in:
Fabio Alessandrelli
2016-12-01 09:01:09 +01:00
parent c18c5013f8
commit a77a0118f6
10 changed files with 31 additions and 0 deletions

View File

@@ -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);