|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectroomba.roombanetwork.util.SocketServer
public class SocketServer
This class accepts connections from socket clients and processes incoming messages
| Constructor Summary | |
|---|---|
SocketServer(int port,
SocketListener listener)
Constructor to set up the server. |
|
SocketServer(int port,
SocketListener listener,
boolean verbose)
Constructor to set up the server. |
|
SocketServer(SocketListener listener)
Constructor to set up the server. |
|
SocketServer(SocketListener listener,
boolean verbose)
Constructor to set up the server. |
|
| Method Summary | |
|---|---|
void |
disconnect()
Called when the server should be shutdown and all clients disconnected |
int |
getPort()
Returns the port that the server is running on |
boolean |
isConnected()
Indicates if the server is connected to a client |
static void |
main(java.lang.String[] args)
Test main method |
void |
run()
Run method used to accept new connections |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SocketServer(int port,
SocketListener listener)
port - The port to listen onlistener - The listener that should be notified whenever there is
a new message
public SocketServer(int port,
SocketListener listener,
boolean verbose)
port - The port to listen onlistener - The listener that should be notified whenever there is
a new messageverbose - True iff the server output should be verbosepublic SocketServer(SocketListener listener)
listener - The listener that should be notified whenever there is
a new message
public SocketServer(SocketListener listener,
boolean verbose)
listener - The listener that should be notified whenever there is
a new messageverbose - True iff the server output should be verbose| Method Detail |
|---|
public int getPort()
public void disconnect()
public boolean isConnected()
public void run()
run in interface java.lang.Runnablepublic static final void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||