# asCorrectWebSocketUrl

val String . asCorrectWebSocketUrl : String (source)

Converts this string to a correct WebSocket URL by ensuring it starts with "ws://" scheme. If the URL already starts with "ws", it is returned unchanged. If the URL contains a scheme (e.g., "http://"), it is replaced with "ws://". If the URL has no scheme, "ws://" is prepended.

#### Return

A properly formatted WebSocket URL