From de9fede4ac775293727abbb15f6c7662c8e7a3e4 Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Thu, 19 Sep 2024 11:57:11 +0100 Subject: [PATCH] update comment for newSession in client --- client/lib/snowflake.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/lib/snowflake.go b/client/lib/snowflake.go index 82573c9..35b85ae 100644 --- a/client/lib/snowflake.go +++ b/client/lib/snowflake.go @@ -330,9 +330,12 @@ func parseIceServers(addresses []string) []webrtc.ICEServer { func newSession(snowflakes SnowflakeCollector) (net.PacketConn, *smux.Session, error) { // We build a persistent KCP session on a sequence of ephemeral WebRTC // connections. This dialContext tells RedialPacketConn how to get a new - // WebRTC connection when the previous one dies. Inside each WebRTC - // connection, we use encapsulationPacketConn to encode packets into a + // WebRTC connection when the previous one dies. + // If Stream based transport are used, inside each WebRTC connection, + // we use encapsulationPacketConn to encode packets into a // 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) { log.Printf("redialing on same connection") // Obtain an available WebRTC remote. May block.