public class SimulationServerSocketImpl<T> extends Object implements SimulationServerSocket<T>
| Constructor and Description |
|---|
SimulationServerSocketImpl(CommunicationServiceImpl owner,
String name,
Integer uplink,
Integer downlink,
Long updelay,
Long downdelay,
Serializer<T> serializer) |
| Modifier and Type | Method and Description |
|---|---|
SimulationSocket<T> |
accept()
Accepts a socket from the waiting queue.
|
int |
available()
Returns the number of waiting sockets ready to be accepted (see
SimulationServerSocket.accept()). |
void |
close()
Closes the server socket and frees up resources.
|
void |
setRates(Integer uplink,
Integer downlink) |
public SimulationServerSocketImpl(CommunicationServiceImpl owner, String name, Integer uplink, Integer downlink, Long updelay, Long downdelay, Serializer<T> serializer)
public int available()
SimulationServerSocketSimulationServerSocket.accept()). This number is zero if there are no listening sockets
and at most the number of sockets which can be accepted without blocking
(but at least one).available in interface SimulationServerSocket<T>public SimulationSocket<T> accept() throws IOException
SimulationServerSocketaccept in interface SimulationServerSocket<T>IOException - if an I/O exception occurspublic void close()
SimulationServerSocketclose in interface SimulationServerSocket<T>close in interface Closeableclose in interface AutoCloseableCopyright © 2015. All rights reserved.