nl.bluering.ppracing
Class NetServer

java.lang.Object
  |
  +--java.net.ServerSocket
        |
        +--nl.bluering.ppracing.NetServer
All Implemented Interfaces:
java.lang.Runnable

public class NetServer
extends java.net.ServerSocket
implements java.lang.Runnable

This class runs as a seperate thread, and deals with incoming new clients


Field Summary
static int PORT
           
 
Constructor Summary
NetServer(NetSClient n)
          Constructs a new serversocket for communication with clientsockets
 
Method Summary
 void run()
          Is called when the thread is started This function waits for clients to connect, and then reports them to the ServerClient
 void start()
          Starts the server in a new thread
 void stop()
          Stops this the thread
 
Methods inherited from class java.net.ServerSocket
accept, close, getInetAddress, getLocalPort, getSoTimeout, implAccept, setSocketFactory, setSoTimeout, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PORT

public static final int PORT
Constructor Detail

NetServer

public NetServer(NetSClient n)
          throws java.io.IOException
Constructs a new serversocket for communication with clientsockets
Method Detail

start

public void start()
Starts the server in a new thread

run

public void run()
Is called when the thread is started This function waits for clients to connect, and then reports them to the ServerClient
Specified by:
run in interface java.lang.Runnable

stop

public void stop()
Stops this the thread