public class TCP extends java.lang.Object implements iConnection
Constructor and Description |
---|
TCP() |
Modifier and Type | Method and Description |
---|---|
void |
connect() |
void |
disconnect() |
java.lang.String |
getHostname() |
int |
getPort() |
int |
read(byte[] response) |
void |
setHostname(java.lang.String hostname) |
void |
setPort(int port) |
void |
setSoTimeout(int timeout) |
boolean |
write(byte[] message) |
public void connect() throws java.io.IOException
connect
in interface iConnection
java.io.IOException
public void disconnect() throws java.io.IOException
disconnect
in interface iConnection
java.io.IOException
public boolean write(byte[] message)
write
in interface iConnection
public int read(byte[] response) throws java.io.IOException
read
in interface iConnection
java.io.IOException
public void setSoTimeout(int timeout)
setSoTimeout
in interface iConnection
public void setHostname(java.lang.String hostname)
setHostname
in interface iConnection
public java.lang.String getHostname()
getHostname
in interface iConnection
public void setPort(int port)
setPort
in interface iConnection
public int getPort()
getPort
in interface iConnection