|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--FishServer
Server handles multiple client connections. The clients
can then upload a list of shared files and search other
users shared files for downloads.
As default the server runs at port 47111, but if
multiple instances of the server is used or another
port is wished to be used, it can be specified as an
commandline argument to the server:
java Server [port number]
Field Summary |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
FishServer(int port)
Tries to open a ServerSocket on the requested port. |
Method Summary | |
static void |
main(java.lang.String[] args)
Static method that tries to start the Server on the default port if no other port is specified on the commandline. |
void |
run()
Accepts incomming clients and gives them a ServerHandler and continues to accept new clients. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public FishServer(int port)
port
- Portnumber to try to start the server on.Method Detail |
public static void main(java.lang.String[] args)
args
- Contains userspecified commandline options.public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |