Question on the usage of conn vs socket in a navigation

Yup, websocket connection are just upgraded HTTP connections!

Protocol upgrade mechanism

The HTTP/1.1 protocol provides a special mechanism that can be used to upgrade an already established connection to a different protocol, using the Upgrade header field.

This mechanism is optional… and in practice, this mechanism is used mostly to bootstrap a WebSockets connection.

source: Protocol upgrade mechanism - HTTP | MDN

And with LiveView, the handoff between the two is configured and can be customized as described here.

1 Like