Update comment not to refer to a Stream transport.

Stream is not part of this branch.
This commit is contained in:
David Fifield 2024-12-12 06:38:50 +00:00 committed by WofWca
parent 0d3b5f02b0
commit c1ac2aa577

View file

@ -330,12 +330,9 @@ func parseIceServers(addresses []string) []webrtc.ICEServer {
func newSession(snowflakes SnowflakeCollector) (net.PacketConn, *smux.Session, error) { func newSession(snowflakes SnowflakeCollector) (net.PacketConn, *smux.Session, error) {
// We build a persistent KCP session on a sequence of ephemeral WebRTC // We build a persistent KCP session on a sequence of ephemeral WebRTC
// connections. This dialContext tells RedialPacketConn how to get a new // connections. This dialContext tells RedialPacketConn how to get a new
// WebRTC connection when the previous one dies. // WebRTC connection when the previous one dies. Inside each WebRTC
// If Stream based transport are used, inside each WebRTC connection, // connection, KCP packets are sent and received, one-to-one, in data
// we use encapsulationPacketConn to encode packets into a // channel messages.
// stream.
// If Packet based transport are used, inside each WebRTC connection,
// packets are sent directly over unreliable data channel.
dialContext := func(ctx context.Context) (net.PacketConn, error) { dialContext := func(ctx context.Context) (net.PacketConn, error) {
log.Printf("redialing on same connection") log.Printf("redialing on same connection")
// Obtain an available WebRTC remote. May block. // Obtain an available WebRTC remote. May block.