eap.freeciv
Class Server

java.lang.Object
  extended byeap.freeciv.Server
All Implemented Interfaces:
PacketListener

public class Server
extends Object
implements PacketListener


Constructor Summary
Server(int port)
           
 
Method Summary
 int getClientCount()
           
 PacketConnection getConnection()
          return the connection to a given client
 PacketConnection getConnection(int index)
          return the connection to a given client
 void listenForClient()
           
 void receivePacket(Packet packet)
          broadcast the given packet to all the clients
 
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)
       throws IOException
Method Detail

getClientCount

public int getClientCount()

getConnection

public PacketConnection getConnection(int index)
return the connection to a given client


getConnection

public PacketConnection getConnection()
return the connection to a given client


listenForClient

public void listenForClient()
                     throws IOException
Throws:
IOException

receivePacket

public void receivePacket(Packet packet)
broadcast the given packet to all the clients

Specified by:
receivePacket in interface PacketListener