data class URLProtocol
Represents URL protocol
URLProtocol(name: String, defaultPort: Int)
Represents URL protocol |
val defaultPort: Int
default port for protocol or |
|
val name: String
of protocol (schema) |
val HTTP: URLProtocol
HTTP with port 80 |
|
val HTTPS: URLProtocol
secure HTTPS with port 443 |
|
val SOCKS: URLProtocol
Socks proxy url protocol. |
|
val WS: URLProtocol
Web socket over HTTP on port 80 |
|
val WSS: URLProtocol
Web socket over secure HTTPS on port 443 |
|
val byName: Map<String, URLProtocol>
Protocols by names map |
fun createOrDefault(name: String): URLProtocol
Create an instance by name or use already existing instance |
fun URLProtocol.isSecure(): Boolean
Check if the protocol is secure |
|
fun URLProtocol.isWebsocket(): Boolean
Check if the protocol is websocket |