diff --git a/stdlib/Std/src/WebSockets.luna b/stdlib/Std/src/WebSockets.luna index 0a62b02b125c..6eacb9785678 100644 --- a/stdlib/Std/src/WebSockets.luna +++ b/stdlib/Std/src/WebSockets.luna @@ -113,15 +113,15 @@ class WebSocket: # `wss` part of the url, you must explicitly call `setSecure` to override # the defaults. Example usage: # ``` - # conn = WebSocket.connection "ws://somehost.com/sockets" . setPort 12345 . create + # conn = WebSocket.connection "ws://somehost.com" "/sockets" . setPort 12345 . create # stream = conn.stream # # process the incoming stream... # conn.close # ``` - def connection host: + def connection host path: secure = host.startsWith "wss" port = if secure then 443 else 80 - WebSocketInstance host port "/" secure + WebSocketInstance host port path secure # Create a simple, broadcast server that recieves messages from its clients # and can send messages to all of the clients at once.