public class Connection extends Object
| Constructor and Description |
|---|
Connection(InetSocketAddress address,
int id) |
Connection(String host,
int port,
int id)
Creates the Socket to the given host and port
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
InetSocketAddress |
getAddress() |
DataInputStream |
getInputStream() |
Member |
getMember() |
DataOutputStream |
getOutputStream() |
Socket |
getSocket() |
int |
getVersion() |
String |
toString() |
public Connection(String host, int port, int id)
host - ip address of the hostport - port of the hostUnknownHostExceptionIOExceptionpublic Connection(InetSocketAddress address, int id)
public Socket getSocket()
public InetSocketAddress getAddress()
public int getVersion()
public void close()
throws IOException
IOExceptionpublic DataOutputStream getOutputStream()
public DataInputStream getInputStream()
public Member getMember()
Copyright © 2021 Hazel Bilisim Ltd.. All rights reserved.