Пример #1
0
func (pm *PasswdManager) addUDP(port string, password [3]string, listener *net.UDPConn) {
	pm.Lock()
	pm.udpListener[port] = &UDPListener{password[0], password[1], password[2], listener}
	pm.Unlock()

	ss.AddTraffic(port)
}
Пример #2
0
func (pm *PasswdManager) add(port string, password [3]string, listener net.Listener, pflag *uint32) {
	pm.Lock()
	pm.portListener[port] = &PortListener{password[0], password[1], password[2], listener, pflag}
	pm.Unlock()

	ss.AddTraffic(port)
}