public final class NetworkConnectionInfo extends Object
| 构造器和说明 |
|---|
NetworkConnectionInfo(String server,
byte[] clientAddr,
int clientPort,
String clientInfo)
Creates new instance of network connection information.
|
NetworkConnectionInfo(String server,
String clientAddr,
int clientPort)
Creates new instance of network connection information.
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getClient()
Returns the client address and port.
|
byte[] |
getClientAddr()
Returns the client address.
|
String |
getClientInfo()
Returns additional client information, or
null. |
int |
getClientPort()
Returns the client port.
|
String |
getServer()
Returns the protocol and port of the server.
|
public NetworkConnectionInfo(String server, String clientAddr, int clientPort) throws UnknownHostException
server - the protocol and port of the serverclientAddr - the client addressclientPort - the client portUnknownHostException - if clientAddr cannot be resolvedpublic NetworkConnectionInfo(String server, byte[] clientAddr, int clientPort, String clientInfo)
server - the protocol and port of the serverclientAddr - the client addressclientPort - the client portclientInfo - additional client information, or nullpublic String getServer()
public byte[] getClientAddr()
public int getClientPort()
public String getClientInfo()
null.nullpublic String getClient()
Copyright © 2022. All rights reserved.