public class ServerInfo extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
ip_addr |
protected int |
port |
| Constructor and Description |
|---|
ServerInfo(String ip_addr,
int port)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Socket |
connect()
connect to server
|
String |
getIpAddr()
return the ip address
|
int |
getPort()
return the port of the server
|
protected String ip_addr
protected int port
public ServerInfo(String ip_addr, int port)
ip_addr - address of the serverport - the port of the serverpublic String getIpAddr()
public int getPort()
public Socket connect() throws IOException
IOExceptionCopyright © 2018 lodsve. All rights reserved.