NetworkLocation

class NetworkLocation : Parcelable


Represents a network location at which a particular service can be reached.

Summary

Public functions

java-static NetworkLocation!
create(ipAddress: InetAddress!, port: Int)

Returns a new NetworkLocation instance for the given ipAddress and port.

java-static NetworkLocation!
create(ipAddress: String!, port: Int)

Returns a new NetworkLocation instance for the given ipAddress string and {code port}.

Boolean
equals(other: Any?)
String!

Returns the IP address as a formatted string, including the scope ID if the IP address is an IPv6 address with the scope ID specified.

InetAddress!

Returns the IP address associated with this location.

Int
String!
Unit
writeToParcel(dest: Parcel!, flags: Int)

Public properties

Int

Inherited functions

From android.os.Parcelable

Public functions

create

java-static fun create(ipAddress: InetAddress!, port: Int): NetworkLocation!

Returns a new NetworkLocation instance for the given ipAddress and port.

create

java-static fun create(ipAddress: String!, port: Int): NetworkLocation!

Returns a new NetworkLocation instance for the given ipAddress string and {code port}. If the IP address string includes a scope ID (e.g. fe80::0:2%43) this scope will be included in the java.net.Inet6Address.

Throws
java.lang.IllegalArgumentException

if the ipAddress is malformed or if the interface id isn't available.

equals

fun equals(other: Any?): Boolean

getFormattedIpAddress

fun getFormattedIpAddress(): String!

Returns the IP address as a formatted string, including the scope ID if the IP address is an IPv6 address with the scope ID specified. (e.g. fe80::0:2%47)

getIpAddress

fun getIpAddress(): InetAddress!

Returns the IP address associated with this location.

hashCode

fun hashCode(): Int

toString

fun toString(): String!

writeToParcel

fun writeToParcel(dest: Parcel!, flags: Int): Unit

Public properties

port

val portInt