
public interface ISocketServer extends Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Gracefully close server.
|
long |
getTotalReadBytes()
Returns the total number of bytes read.
|
long |
getTotalSentBytes()
Retuns the total number of bytes sent.
|
float |
getTransferRateIn()
Incoming data transfer rate in bytes/second.
|
float |
getTransferRateOut()
Outgoing data transfer rate in bytes/second.
|
void |
run()
Starts server in current thread.
|
void |
setIP(String ip)
Sets the IP to be used by the server to bind the port for incoming
connections.
|
void |
setPort(int port)
Sets the port to be used to listen for connections.
|
void |
start()
Starts server in independent thread.
|
void close()
throws IOException
close in interface AutoCloseableclose in interface CloseableIOException - exception raised while closing the serverlong getTotalReadBytes()
long getTotalSentBytes()
float getTransferRateIn()
float getTransferRateOut()
void run() throws IOException
IOException - exception raised while starting the server on a separated
threadvoid setIP(String ip)
ip - server IP in string format: "xxx.xxxx.xxx.xxx"void setPort(int port)
port - usded to listen for incoming connectionsvoid start()
throws IOException
IOException - exception raised while starting the server in independent
threadCopyright © 2018 universAAL Consortium. All rights reserved.