https://kotlinlang.org logo
#ktor
Title
# ktor
b

brabo-hi

01/27/2022, 12:07 AM
Hi, what is the difference between
<http://httpclient.ws|httpclient.ws>()
and
httpclient.websocket()?
a

Aleksei Tirman [JB]

01/27/2022, 11:05 AM
The
ws
and
wss
methods are used to create a websocket session with a different initial configuration. They call the
websocket
method under the hood.
b

brabo-hi

01/27/2022, 6:24 PM
Why is
wss()
default port on
80
instead of
443
?
a

Aleksei Tirman [JB]

01/28/2022, 8:24 AM
According to the following code, the port is 443:
Copy code
{
    url.protocol = URLProtocol.WSS
    url.port = url.protocol.defaultPort
    request()
},
block = block
Since
WSS
defined as
URLProtocol("wss", 443)
1
2 Views