gcspy.comm
Class Server

java.lang.Object
  extended by gcspy.comm.Server

public class Server
extends java.lang.Object

More socket stuff wrapped out

Author:
Tony Printezis

Constructor Summary
Server(int port)
          Create a new Server
Server(int port, int backlog)
          Create a new Server
 
Method Summary
 void close()
          Close the server
 Client waitForNewClient(int maxLen)
          Wait for a new client
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Server

public Server(int port,
              int backlog)
       throws java.io.IOException
Create a new Server

Parameters:
port - The port to communicate on
backlog - The server socket backlog
Throws:
java.io.IOException

Server

public Server(int port)
       throws java.io.IOException
Create a new Server

Parameters:
port - The port to communicate on
Throws:
java.io.IOException
Method Detail

waitForNewClient

public Client waitForNewClient(int maxLen)
                        throws java.io.IOException
Wait for a new client

Parameters:
maxLen - The maximum length of the stream
Returns:
a new client
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Close the server

Throws:
java.io.IOException