T - the type of data transferredpublic interface SimulationSocket<T> extends Closeable
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Returns the amount of objects ready for receiving.
|
void |
close()
Closes this socket.
|
boolean |
established()
Returns true if a connection is established with the other socket (ie.
|
T |
read()
Receives an object from this socket.
|
void |
write(T object)
Writes an object to this socket.
|
boolean established()
int available()
throws IOException
IOException - if any I/O operation failsT read() throws IOException
IOException - if receiving failsvoid write(T object) throws IOException
object - the object to be writtenIOException - if sending failsvoid close()
close in interface AutoCloseableclose in interface CloseableCopyright © 2015. All rights reserved.