func (me *Peer) FromPex(na krpc.NodeAddr, fs peer_protocol.PexPeerFlags) {
	me.Addr = ipPortAddr{append([]byte(nil), na.IP...), na.Port}
	me.Source = PeerSourcePex
	// If they prefer encryption, they must support it.
	if fs.Get(peer_protocol.PexPrefersEncryption) {
		me.SupportsEncryption = true
	}
	me.PexPeerFlags = fs
}
// FromPex generate Peer from peer exchange
FromPex generate Peer from peer exchange
// FromPex generate Peer from peer exchange
func (me *Peer) FromPex(na krpc.NodeAddr, fs peer_protocol.PexPeerFlags) {
	me.Addr = ipPortAddr{append([]byte(nil), na.IP...), na.Port}
	me.Source = PeerSourcePex
	if fs.Get(peer_protocol.PexPrefersEncryption) {
		me.SupportsEncryption = true
	}
	me.PexPeerFlags = fs
}
func ( me * Peer ) FromPex ( na krpc . NodeAddr , fs peer_protocol . PexPeerFlags ) { me . Addr = ipPortAddr { append ( [ ] byte ( nil ) , na . IP ... ) , na . Port } me . Source = PeerSourcePex if fs . Get ( peer_protocol . PexPrefersEncryption ) { me . SupportsEncryption = true } me . PexPeerFlags = fs }
FromPex generate Peer from peer exchange
FromPex generate Peer from peer exchange
// If they prefer encryption, they must support it.