You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Custom headers support in WebSocketClient.
This commit also converts all PoolVector<String> parameters to `const Vector<String>` in both WebSocketServer and WebSocketClient.
This commit is contained in:
@@ -64,11 +64,14 @@ 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, PoolVector<String> p_protocols) {
|
||||
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) {
|
||||
|
||||
String proto_string = p_protocols.join(",");
|
||||
String str = "ws://";
|
||||
|
||||
if (p_custom_headers.size()) {
|
||||
WARN_PRINT_ONCE("Custom headers are not supported in in HTML5 platform.");
|
||||
}
|
||||
if (p_ssl) {
|
||||
str = "wss://";
|
||||
if (ssl_cert.is_valid()) {
|
||||
|
||||
Reference in New Issue
Block a user