StunMessage class
Properties
-
attributes
→ Map<
int, Uint8List> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
transactionId
→ List<
int> -
final
- type → int
-
final
Methods
-
encode(
) → Uint8List - Encode the STUN message to bytes
-
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
Static Methods
-
createBindingRequest(
) → StunMessage - Creates a binding request message
-
createBindingRequestWithChangeRequest(
{bool changeIP = false, bool changePort = false}) → StunMessage - Creates a binding request message with CHANGE-REQUEST attribute
-
createBindingResponse(
List< int> transactionId, dynamic address, int port) → StunMessage - Creates a binding response message with mapped address
-
decode(
Uint8List data) → StunMessage? - Decode a STUN message from bytes
-
decodeAddress(
Uint8List data) → ({InternetAddress address, int port})? - Decodes an address attribute (MAPPED-ADDRESS, RESPONSE-ORIGIN, OTHER-ADDRESS)
-
extractOtherAddress(
StunMessage message) → ({InternetAddress address, int port})? - Extracts the OTHER-ADDRESS attribute from a STUN message
-
extractResponseOrigin(
StunMessage message) → ({InternetAddress address, int port})? - Extracts the RESPONSE-ORIGIN attribute from a STUN message
Constants
- magicCookie → const int