1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-24 15:26:15 +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

@@ -51,8 +51,14 @@ Error PacketPeerUDP::_set_send_address(const String& p_address, int p_port) {
return OK;
}
void PacketPeerUDP::set_ip_type(IP::Type p_type) {
close();
ip_type = p_type;
}
void PacketPeerUDP::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_ip_type","ip_type"),&PacketPeerUDP::set_ip_type);
ObjectTypeDB::bind_method(_MD("listen:Error","port", "recv_buf_size"),&PacketPeerUDP::listen,DEFVAL(65536));
ObjectTypeDB::bind_method(_MD("close"),&PacketPeerUDP::close);
ObjectTypeDB::bind_method(_MD("wait:Error"),&PacketPeerUDP::wait);