public interface ISocket extends AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Formally closes the connection
|
void |
connect(InetSocketAddress endpoint)
Connects the underlaying Socket to the endpoint
|
void |
flush()
Forces the socket to send all data
|
InputStream |
getInputStream()
Gets the inputstream from the underlaying socket
|
OutputStream |
getOutputStream()
Gets the outputstream from the underlaying socket
|
boolean |
isClosed()
Checks if the connection has been closed
|
boolean |
isInputShutdown()
Checks if there will be no more data incoming
|
boolean |
isOutputShutdown()
Checks if no more data can be send on this socket
|
void connect(InetSocketAddress endpoint) throws IOException
endpoint - The Address to connect toIOException - When connection failsInputStream getInputStream() throws IOException
IOException - when the stream could not be createdOutputStream getOutputStream() throws IOException
IOException - when the stream could not be createdvoid close()
throws IOException
close in interface AutoCloseableIOException - When the connection could not be closedboolean isClosed()
boolean isInputShutdown()
boolean isOutputShutdown()
void flush()
throws IOException
IOExceptionCopyright © 2016. All rights reserved.