MCPcopy
hub / github.com/tailscale/tailscale / startPacketReaders

Method startPacketReaders

net/udprelay/server.go:439–456  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

437}
438
439func (s *Server) startPacketReaders() {
440 for i, uc := range s.uc4 {
441 var other batching.Conn
442 if len(s.uc6) > 0 {
443 other = s.uc6[min(len(s.uc6)-1, i)]
444 }
445 s.wg.Add(1)
446 go s.packetReadLoop(uc, other, true)
447 }
448 for i, uc := range s.uc6 {
449 var other batching.Conn
450 if len(s.uc4) > 0 {
451 other = s.uc4[min(len(s.uc4)-1, i)]
452 }
453 s.wg.Add(1)
454 go s.packetReadLoop(uc, other, false)
455 }
456}
457
458func (s *Server) addrDiscoveryLoop() {
459 defer s.wg.Done()

Callers 1

NewServerFunction · 0.80

Calls 3

packetReadLoopMethod · 0.95
minFunction · 0.85
AddMethod · 0.65

Tested by

no test coverage detected