public final class JoinAddress
extends java.lang.Object
ServerAddress field of its login
client data.
RakNet clients send host:port, with IPv6 unbracketed. NetherNet clients send the signaling URL with the
port repeated, such as http://example.com:19132:19132. Each shape is read with or without the scheme and
the repeated port, so an HTTP Host header reads too.
| Constructor and Description |
|---|
JoinAddress(java.lang.String host,
int port) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getHost()
The hostname or IP address as the client sent it, without IPv6 brackets.
|
int |
getPort()
The port, or the default when the address names none or an invalid one.
|
int |
hashCode() |
static JoinAddress |
parse(java.lang.String address,
int defaultPort)
Never fails: text that is no address comes back as the host.
|
java.lang.String |
toString() |
java.net.InetSocketAddress |
toUnresolved() |
public static JoinAddress parse(java.lang.String address, int defaultPort)
address - the address to readdefaultPort - the port when the address has none, unless an http or https scheme implies onepublic java.net.InetSocketAddress toUnresolved()
public java.lang.String getHost()
public int getPort()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object