public class TCPSocket extends java.lang.Object implements ITCPSocket
Socket implementation for the ITCPSocket interface.| Constructor and Description |
|---|
TCPSocket(ServerAddress serverAddress,
int connectTimeout,
int readTimeout) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
connect()
Connect the socket to the server.
|
java.io.InputStream |
getInputStream() |
java.io.OutputStream |
getOutputStream() |
public TCPSocket(ServerAddress serverAddress, int connectTimeout, int readTimeout)
public void connect()
throws java.io.IOException
ITCPSocketconnect in interface ITCPSocketjava.io.IOException - If an I/O error occurspublic java.io.InputStream getInputStream()
getInputStream in interface ITCPSocketpublic java.io.OutputStream getOutputStream()
getOutputStream in interface ITCPSocketpublic void close()
throws java.io.IOException
close in interface java.lang.AutoCloseablejava.io.IOException