The TLS handshake might take several seconds to complete and the WS listener should not be blocked by this. For this, we perform the handshake in a separate task and then communicate the resulting stream to the WS listener once it is ready. In the meantime, the listener can listen for other incoming connections.
The TLS handshake might take several seconds to complete and the WS listener should not be blocked by this. For this, we perform the handshake in a separate task and then communicate the resulting stream to the WS listener once it is ready. In the meantime, the listener can listen for other incoming connections.