WebsocketURL returns the ws(s):// variant of URL(host, service, port, useTLS).
(host, service string, port uint, useTLS bool)
| 22 | |
| 23 | // WebsocketURL returns the ws(s):// variant of URL(host, service, port, useTLS). |
| 24 | func WebsocketURL(host, service string, port uint, useTLS bool) string { |
| 25 | return strings.Replace(URL(host, service, port, useTLS), "http", "ws", 1) |
| 26 | } |