mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
Fix websocket_url on the minimal WebSocket client example (#5885)
Co-authored-by: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>
This commit is contained in:
@@ -37,7 +37,7 @@ This example will show you how to create a WebSocket connection to a remote serv
|
||||
extends Node
|
||||
|
||||
# The URL we will connect to
|
||||
export var websocket_url = "ws://echo.websocket.org"
|
||||
export var websocket_url = "wss://libwebsockets.org"
|
||||
|
||||
# Our WebSocketClient instance
|
||||
var _client = WebSocketClient.new()
|
||||
@@ -53,7 +53,7 @@ This example will show you how to create a WebSocket connection to a remote serv
|
||||
_client.connect("data_received", self, "_on_data")
|
||||
|
||||
# Initiate connection to the given URL.
|
||||
var err = _client.connect_to_url(websocket_url)
|
||||
var err = _client.connect_to_url(websocket_url, ["lws-mirror-protocol"])
|
||||
if err != OK:
|
||||
print("Unable to connect")
|
||||
set_process(false)
|
||||
|
||||
Reference in New Issue
Block a user