DCUtRUdpCoordinator class

Coordinates DCUtR hole-punching over a UdpSocket.

Each outgoing datagram is prefixed with a 4-byte magic (0x44435452, i.e. "DCTR") followed by the serialized DCUtRMessage. Incoming datagrams are parsed, validated, and used to drive the supplied DCUtRStateMachine.

Constructors

DCUtRUdpCoordinator(UdpSocket _socket, DCUtRStateMachine _stateMachine)

Properties

hashCode int
The hash code for this object.
no setterinherited
isConnected bool
Whether the DCUtR handshake has reached the connected state.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendConnect(InternetAddress addr, int port, List<int> observedAddr) Future<bool>
Sends a DCUtR CONNECT message to addr:port and transitions the state machine with onConnectSent().
sendSync(InternetAddress addr, int port, List<int> observedAddr) Future<bool>
Sends a DCUtR SYNC message to addr:port and transitions the state machine with onSyncReceived().
startListening() → void
Starts listening to the underlying UdpSocket for DCUtR datagrams.
stopListening() → void
Cancels the subscription on the UDP socket.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited