diff options
Diffstat (limited to 'modules/websocket/emws_client.cpp')
-rw-r--r-- | modules/websocket/emws_client.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/modules/websocket/emws_client.cpp b/modules/websocket/emws_client.cpp index bc9d75d327..7c31449709 100644 --- a/modules/websocket/emws_client.cpp +++ b/modules/websocket/emws_client.cpp @@ -65,7 +65,6 @@ EMSCRIPTEN_KEEPALIVE void _esws_on_close(void *obj, int code, char *reason, int } Error EMWSClient::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) { - String proto_string; for (int i = 0; i < p_protocols.size(); i++) { if (i != 0) @@ -190,12 +189,10 @@ void EMWSClient::poll() { } Ref<WebSocketPeer> EMWSClient::get_peer(int p_peer_id) const { - return _peer; } NetworkedMultiplayerPeer::ConnectionStatus EMWSClient::get_connection_status() const { - if (_peer->is_connected_to_host()) { if (_is_connecting) return CONNECTION_CONNECTING; @@ -206,17 +203,14 @@ NetworkedMultiplayerPeer::ConnectionStatus EMWSClient::get_connection_status() c }; void EMWSClient::disconnect_from_host(int p_code, String p_reason) { - _peer->close(p_code, p_reason); }; IP_Address EMWSClient::get_connected_host() const { - ERR_FAIL_V_MSG(IP_Address(), "Not supported in HTML5 export."); }; uint16_t EMWSClient::get_connected_port() const { - ERR_FAIL_V_MSG(0, "Not supported in HTML5 export."); }; @@ -244,7 +238,6 @@ EMWSClient::EMWSClient() { }; EMWSClient::~EMWSClient() { - disconnect_from_host(); _peer = Ref<EMWSPeer>(); /* clang-format off */ |