Versions in this module Expand all Collapse all v0 v0.45.1 Nov 12, 2022 v0.45.0 Nov 12, 2022 Changes in this version + var NatHoleTimeout int64 = 10 + type ClientCfg struct + Name string + SidCh chan *SidRequest + Sk string + type Controller struct + func NewController(udpBindAddr string) (nc *Controller, err error) + func (nc *Controller) CloseClient(name string) + func (nc *Controller) GenNatHoleResponse(session *Session, errInfo string) []byte + func (nc *Controller) GenSid() string + func (nc *Controller) HandleClient(m *msg.NatHoleClient, raddr *net.UDPAddr) + func (nc *Controller) HandleVisitor(m *msg.NatHoleVisitor, raddr *net.UDPAddr) + func (nc *Controller) ListenClient(name string, sk string) (sidCh chan *SidRequest) + func (nc *Controller) Run() + type Session struct + ClientAddr *net.UDPAddr + NotifyCh chan struct{} + Sid string + VisitorAddr *net.UDPAddr + type SidRequest struct + NotifyCh chan struct{} + Sid string