func NewPeerConn(ctx context.Context, peerURL string) (PeerConn, error) {
	if parsedURL, err := url.Parse(peerURL); err != nil {
		return nil, err
	} else if peerNew := PeerURLSchemes[parsedURL.Scheme]; peerNew == nil {
		return nil, fmt.Errorf("Unknown peer URL scheme %v", parsedURL.Scheme)
	} else {
		return peerNew(ctx, parsedURL)
	}
}
// NewPeerConn connects to a peer for the given URL.
NewPeerConn connects to a peer for the given URL.
// NewPeerConn connects to a peer for the given URL .
func NewPeerConn(ctx context.Context, peerURL string) (PeerConn, error) {
	if parsedURL, err := url.Parse(peerURL); err != nil {
		return nil, err
	} else if peerNew := PeerURLSchemes[parsedURL.Scheme]; peerNew == nil {
		return nil, fmt.Errorf("Unknown peer URL scheme %v", parsedURL.Scheme)
	} else {
		return peerNew(ctx, parsedURL)
	}
}
func NewPeerConn ( ctx context . Context , peerURL string ) ( PeerConn , error ) { if parsedURL , err := url . Parse ( peerURL ) ; err != nil { return nil , err } else if peerNew := PeerURLSchemes [ parsedURL . Scheme ] ; peerNew == nil { return nil , fmt . Errorf ( " " , parsedURL . Scheme ) } else { return peerNew ( ctx , parsedURL ) } }
NewPeerConn connects to a peer for the given URL.
NewPeerConn connects to a peer for the given URL .