|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--Server.Server
A server waiting for connections
Field Summary | |
private java.net.ServerSocket |
serverSocket
ServerSocket on which the server is working. |
Fields inherited from class java.lang.Thread |
contextClassLoader, daemon, eetop, group, inheritableThreadLocals, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadLocals, threadQ |
Constructor Summary | |
Server(int server_port,
int max_connections)
Initializes the server and its configuration. |
Method Summary | |
java.net.Socket |
listen()
Wait for a client connection |
static void |
main(java.lang.String[] args)
Main front-end for the server. |
void |
run()
A front-end for the server thread. |
Methods inherited from class java.lang.Thread |
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private final java.net.ServerSocket serverSocket
Constructor Detail |
public Server(int server_port, int max_connections) throws java.io.IOException
server_port
- The port to listenmax_connections
- Maximum number of concurrent connections to the serverMethod Detail |
public final java.net.Socket listen()
public final void run()
run
in class java.lang.Thread
public static void main(java.lang.String[] args) throws java.io.IOException
args
- java.io.IOException
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |