summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2019-10-11 18:39:03 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2019-10-15 14:15:02 +0200
commitd75e0de729ab3f6e809f025e632be41ad2e476b7 (patch)
tree60909baeac4be9ce6ab1367c91a02a058425bff4 /modules
parent1fed266bf5452b30376db62495f4985f6975f2c1 (diff)
Fix HTML5 build after 67a4c30.
I messed up a rebase and a commit was partly skipped
Diffstat (limited to 'modules')
-rw-r--r--modules/websocket/emws_client.cpp10
-rw-r--r--modules/websocket/emws_client.h2
-rw-r--r--modules/websocket/emws_server.cpp2
-rw-r--r--modules/websocket/emws_server.h2
4 files changed, 11 insertions, 5 deletions
diff --git a/modules/websocket/emws_client.cpp b/modules/websocket/emws_client.cpp
index fad766ea5d..983db60d5e 100644
--- a/modules/websocket/emws_client.cpp
+++ b/modules/websocket/emws_client.cpp
@@ -64,9 +64,15 @@ 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 PoolVector<String> p_protocols, const Vector<String> p_custom_headers) {
+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)
+ proto_string += ",";
+ proto_string += p_protocols[i];
+ }
- String proto_string = p_protocols.join(",");
String str = "ws://";
if (p_custom_headers.size()) {
diff --git a/modules/websocket/emws_client.h b/modules/websocket/emws_client.h
index 2d35f7f0f6..67705891b2 100644
--- a/modules/websocket/emws_client.h
+++ b/modules/websocket/emws_client.h
@@ -50,7 +50,7 @@ public:
bool _is_connecting;
Error set_buffers(int p_in_buffer, int p_in_packets, int p_out_buffer, int p_out_packets);
- Error connect_to_host(String p_host, String p_path, uint16_t p_port, bool p_ssl, const PoolVector<String> p_protocol = PoolVector<String>(), const Dictionary p_custom_headers = Dictionary());
+ Error connect_to_host(String p_host, String p_path, uint16_t p_port, bool p_ssl, const Vector<String> p_protocol = Vector<String>(), const Vector<String> p_custom_headers = Vector<String>());
Ref<WebSocketPeer> get_peer(int p_peer_id) const;
void disconnect_from_host(int p_code = 1000, String p_reason = "");
IP_Address get_connected_host() const;
diff --git a/modules/websocket/emws_server.cpp b/modules/websocket/emws_server.cpp
index c4bb459ad0..9a6a30d613 100644
--- a/modules/websocket/emws_server.cpp
+++ b/modules/websocket/emws_server.cpp
@@ -33,7 +33,7 @@
#include "emws_server.h"
#include "core/os/os.h"
-Error EMWSServer::listen(int p_port, PoolVector<String> p_protocols, bool gd_mp_api) {
+Error EMWSServer::listen(int p_port, Vector<String> p_protocols, bool gd_mp_api) {
return FAILED;
}
diff --git a/modules/websocket/emws_server.h b/modules/websocket/emws_server.h
index a5e5b4090e..e8da8c26b4 100644
--- a/modules/websocket/emws_server.h
+++ b/modules/websocket/emws_server.h
@@ -43,7 +43,7 @@ class EMWSServer : public WebSocketServer {
public:
Error set_buffers(int p_in_buffer, int p_in_packets, int p_out_buffer, int p_out_packets);
- Error listen(int p_port, PoolVector<String> p_protocols = PoolVector<String>(), bool gd_mp_api = false);
+ Error listen(int p_port, Vector<String> p_protocols = Vector<String>(), bool gd_mp_api = false);
void stop();
bool is_listening() const;
bool has_peer(int p_id) const;