mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
[WebSocket] Fix debugger implementation.
Register module during core initialization so the remote debugger can properly handle the "wss://" protocol.
This commit is contained in:
parent
7464f39de8
commit
40d60ca6ae
4 changed files with 19 additions and 13 deletions
|
@ -40,7 +40,13 @@
|
|||
|
||||
void EditorDebuggerServerWebSocket::poll() {
|
||||
if (pending_peer.is_null() && tcp_server->is_connection_available()) {
|
||||
Ref<WebSocketPeer> peer;
|
||||
Ref<WebSocketPeer> peer = Ref<WebSocketPeer>(WebSocketPeer::create());
|
||||
ERR_FAIL_COND(peer.is_null()); // Bug.
|
||||
|
||||
Vector<String> ws_protocols;
|
||||
ws_protocols.push_back("binary"); // Compatibility for emscripten TCP-to-WebSocket.
|
||||
peer->set_supported_protocols(ws_protocols);
|
||||
|
||||
Error err = peer->accept_stream(tcp_server->take_connection());
|
||||
if (err == OK) {
|
||||
pending_timer = OS::get_singleton()->get_ticks_msec();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue