AddressUtility class

Utility functions for address formatting

Constructors

AddressUtility()

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

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

formatAddress(RemoteInfo rinfo) → String
Format a RemoteInfo object into a string key Format: "address:port"
formatAddressParts(PeerInfo peerInfo) → String
Format a PeerInfo object into a string key Format: "address:port"
fromString(String formatted) → RemoteInfo?
Create RemoteInfo from string format "address:port" Returns null if the format is invalid or the address/port cannot be parsed
getLocalIp() → Future<String>
Get local private IP address Returns the first non-loopback IPv4 address found Throws ShspNetworkException if no suitable address is found
parseAddress(String formatted) → Map<String, dynamic>?
Parse a formatted address string back to components Returns a Map with 'address' and 'port' keys