示例#1
0
文件: client.go 项目: keryoo/circuit
func DialDiscover(multicast string, authkey []byte) *Client {
	mcast, err := net.ResolveUDPAddr("udp", multicast)
	if err != nil {
		panic(err)
	}
	_once.Do(func() {
		_init(authkey)
	})
	c := &Client{}
	dialback := assemble.NewAssembler(circuit.ServerAddr(), mcast).AssembleClient()
	c.y = locus.YLocus{circuit.Dial(dialback, "locus")}
	return c
}
示例#2
0
func (*_permref) Addr() n.Addr {
	return circuit.ServerAddr()
}