Documentation
¶
Index ¶
- Constants
- type Transport
- func (t *Transport) CanDial(addr ma.Multiaddr) bool
- func (t *Transport) Close() error
- func (t *Transport) Dial(ctx context.Context, raddr ma.Multiaddr, p peer.ID) (tpt.CapableConn, error)
- func (t *Transport) Listen(laddr ma.Multiaddr) (tpt.Listener, error)
- func (t *Transport) Protocols() []int
- func (t *Transport) Proxy() bool
Constants ¶
View Source
const P_UDX = 0x0300
P_UDX is the multiaddr protocol code for UDX. Uses 0x0300 (private use range), matching dart-libp2p.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport implements the go-libp2p Transport interface using UDX.
func NewTransport ¶
func NewTransport(key ic.PrivKey, u tpt.Upgrader, rcmgr network.ResourceManager) (*Transport, error)
NewTransport creates a new UDX transport with the given upgrader. The upgrader handles security (Noise) and stream muxing (Yamux).
func (*Transport) Dial ¶
func (t *Transport) Dial(ctx context.Context, raddr ma.Multiaddr, p peer.ID) (tpt.CapableConn, error)
Dial dials a remote peer over UDX.
Click to show internal directories.
Click to hide internal directories.