|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISocketServer
Socket server interface. All sockets servers will implement it.
Method Summary | |
---|---|
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. |
Method Detail |
---|
void close() throws IOException
close
in interface Closeable
IOException
- 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 thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |