From 87adf9cfbab00a40aad483b4e709518d5f61b6d1 Mon Sep 17 00:00:00 2001 From: Marlon Henry Schweigert Date: Tue, 30 Jan 2018 13:22:15 -0200 Subject: Display set_nodelay to GDScript Pass enabled arg Rename set_nodelay to set_no_delay Add description to the method Change description --- core/io/file_access_network.cpp | 2 +- core/io/stream_peer_tcp.cpp | 1 + core/io/stream_peer_tcp.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/io/file_access_network.cpp b/core/io/file_access_network.cpp index 7b2bccdfec..ef886cdb3c 100644 --- a/core/io/file_access_network.cpp +++ b/core/io/file_access_network.cpp @@ -83,7 +83,7 @@ int64_t FileAccessNetworkClient::get_64() { void FileAccessNetworkClient::_thread_func() { - client->set_nodelay(true); + client->set_no_delay(true); while (!quit) { DEBUG_PRINT("SEM WAIT - " + itos(sem->get())); diff --git a/core/io/stream_peer_tcp.cpp b/core/io/stream_peer_tcp.cpp index 9cfa810034..5d008904ff 100644 --- a/core/io/stream_peer_tcp.cpp +++ b/core/io/stream_peer_tcp.cpp @@ -55,6 +55,7 @@ void StreamPeerTCP::_bind_methods() { ClassDB::bind_method(D_METHOD("get_connected_host"), &StreamPeerTCP::get_connected_host); ClassDB::bind_method(D_METHOD("get_connected_port"), &StreamPeerTCP::get_connected_port); ClassDB::bind_method(D_METHOD("disconnect_from_host"), &StreamPeerTCP::disconnect_from_host); + ClassDB::bind_method(D_METHOD("set_no_delay", "enabled"), &StreamPeerTCP::set_no_delay); BIND_ENUM_CONSTANT(STATUS_NONE); BIND_ENUM_CONSTANT(STATUS_CONNECTING); diff --git a/core/io/stream_peer_tcp.h b/core/io/stream_peer_tcp.h index fc84525c5f..8a16d820f2 100644 --- a/core/io/stream_peer_tcp.h +++ b/core/io/stream_peer_tcp.h @@ -65,7 +65,7 @@ public: virtual void disconnect_from_host() = 0; virtual IP_Address get_connected_host() const = 0; virtual uint16_t get_connected_port() const = 0; - virtual void set_nodelay(bool p_enabled) = 0; + virtual void set_no_delay(bool p_enabled) = 0; static Ref create_ref(); static StreamPeerTCP *create(); -- cgit v1.2.3