Starts a tcp server on the listen port and hands connections off to internal http or https servers (depdending on connection type).
Upgrade requests from both servers are handled by a websocket server.
The https server is enabled when either a secure websocket address is listened to explicitly, or when a TLS certificate is provisioned by another libp2p component, likely @libp2p/auto-tls.
This means we don't need to add another port mapping for the https server since we run http and https over the same port.
Change checklist
[x] I have performed a self-review of my own code
[x] I have made corresponding changes to the documentation if necessary (this includes comments as well)
[x] I have added tests that prove my fix is effective or that my feature works
Starts a tcp server on the listen port and hands connections off to internal http or https servers (depdending on connection type).
Upgrade requests from both servers are handled by a websocket server.
The https server is enabled when either a secure websocket address is listened to explicitly, or when a TLS certificate is provisioned by another libp2p component, likely
@libp2p/auto-tls
.This means we don't need to add another port mapping for the https server since we run http and https over the same port.
Change checklist