HolePuncher class
The holepuncher is run on the peer that's behind a NAT / Firewall. It observes new incoming connections via a relay that it has a reservation with, and initiates the DCUtR protocol with them. It then first tries to establish a direct connection, and if that fails, it initiates a hole punch.
Constructors
-
HolePuncher.new(Host _host, IDService _ids, List<
MultiAddr> _listenAddrs(), {HolePunchTracer? tracer, AddrFilter? filter}) - Creates a new holepuncher
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< void> - Closes the holepuncher
-
directConnect(
PeerId peerId) → Future< void> - Attempts to make a direct connection with a remote peer. It first attempts a direct dial (if we have a public address of that peer), and then coordinates a hole punch over the given relay connection.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited