You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
This commit is contained in:
@@ -154,7 +154,6 @@ bool WSLClient::_verify_headers(String &r_protocol) {
|
||||
}
|
||||
|
||||
Error WSLClient::connect_to_host(String p_host, String p_path, uint16_t p_port, bool p_ssl, const Vector<String> p_protocols, const Vector<String> p_custom_headers) {
|
||||
|
||||
ERR_FAIL_COND_V(_connection.is_valid(), ERR_ALREADY_IN_USE);
|
||||
|
||||
_peer = Ref<WSLPeer>(memnew(WSLPeer));
|
||||
@@ -278,14 +277,12 @@ void WSLClient::poll() {
|
||||
}
|
||||
|
||||
Ref<WebSocketPeer> WSLClient::get_peer(int p_peer_id) const {
|
||||
|
||||
ERR_FAIL_COND_V(p_peer_id != 1, NULL);
|
||||
|
||||
return _peer;
|
||||
}
|
||||
|
||||
NetworkedMultiplayerPeer::ConnectionStatus WSLClient::get_connection_status() const {
|
||||
|
||||
if (_peer->is_connected_to_host())
|
||||
return CONNECTION_CONNECTED;
|
||||
|
||||
@@ -296,7 +293,6 @@ NetworkedMultiplayerPeer::ConnectionStatus WSLClient::get_connection_status() co
|
||||
}
|
||||
|
||||
void WSLClient::disconnect_from_host(int p_code, String p_reason) {
|
||||
|
||||
_peer->close(p_code, p_reason);
|
||||
_connection = Ref<StreamPeer>(NULL);
|
||||
_tcp = Ref<StreamPeerTCP>(memnew(StreamPeerTCP));
|
||||
@@ -314,13 +310,11 @@ void WSLClient::disconnect_from_host(int p_code, String p_reason) {
|
||||
}
|
||||
|
||||
IP_Address WSLClient::get_connected_host() const {
|
||||
|
||||
ERR_FAIL_COND_V(!_peer->is_connected_to_host(), IP_Address());
|
||||
return _peer->get_connected_host();
|
||||
}
|
||||
|
||||
uint16_t WSLClient::get_connected_port() const {
|
||||
|
||||
ERR_FAIL_COND_V(!_peer->is_connected_to_host(), 0);
|
||||
return _peer->get_connected_port();
|
||||
}
|
||||
@@ -347,7 +341,6 @@ WSLClient::WSLClient() {
|
||||
}
|
||||
|
||||
WSLClient::~WSLClient() {
|
||||
|
||||
_peer->close_now();
|
||||
_peer->invalidate();
|
||||
disconnect_from_host();
|
||||
|
||||
Reference in New Issue
Block a user