1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Allow setting ip_type for TCP/UDP and HTTP classes

(cherry picked from commit a77a0118f6)
This commit is contained in:
Fabio Alessandrelli
2016-12-01 09:01:09 +01:00
parent e8a6cbc897
commit 7ef71b9013
10 changed files with 31 additions and 0 deletions

View File

@@ -45,8 +45,14 @@ Error StreamPeerTCP::_connect(const String& p_address,int p_port) {
return OK;
}
void StreamPeerTCP::set_ip_type(IP::Type p_type) {
disconnect();
ip_type = p_type;
}
void StreamPeerTCP::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_ip_type","ip_type"),&StreamPeerTCP::set_ip_type);
ObjectTypeDB::bind_method(_MD("connect","host","port"),&StreamPeerTCP::_connect);
ObjectTypeDB::bind_method(_MD("is_connected"),&StreamPeerTCP::is_connected);
ObjectTypeDB::bind_method(_MD("get_status"),&StreamPeerTCP::get_status);