Set max number of snowflakes in the Tongue

This commit is contained in:
Cecylia Bocovich 2020-08-11 13:57:51 -04:00
parent 1364d7d45b
commit cc55481faf
6 changed files with 52 additions and 32 deletions

View file

@ -144,8 +144,10 @@ var sessionManager = sessionManager_{}
// remote peer and exchange traffic.
func Handler(socks net.Conn, tongue Tongue) error {
// Prepare to collect remote WebRTC peers.
snowflakes := NewPeers(1)
snowflakes.Tongue = tongue
snowflakes, err := NewPeers(tongue)
if err != nil {
return err
}
// Use a real logger to periodically output how much traffic is happening.
snowflakes.BytesLogger = NewBytesSyncLogger()