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

[Net] Drop is_connected_to_host for TCP and UDP.

The UDP method is now called `is_socket_connected` to limit confusion
with the actual host connection status which doesn't make sense in UDP.

The TCP method is completly dropped, use get_status instead.

The only one left is the WebSocketPeer one, which should be fine as is
for now.
This commit is contained in:
Fabio Alessandrelli
2022-03-27 16:31:56 +02:00
parent 0e52867668
commit 331f1662df
8 changed files with 8 additions and 20 deletions

View File

@@ -115,7 +115,7 @@ Error PacketPeerMbedDTLS::_do_handshake() {
}
Error PacketPeerMbedDTLS::connect_to_peer(Ref<PacketPeerUDP> p_base, bool p_validate_certs, const String &p_for_hostname, Ref<X509Certificate> p_ca_certs) {
ERR_FAIL_COND_V(!p_base.is_valid() || !p_base->is_connected_to_host(), ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V(!p_base.is_valid() || !p_base->is_socket_connected(), ERR_INVALID_PARAMETER);
base = p_base;
int ret = 0;