eap.freeciv
Class Server
java.lang.Object
eap.freeciv.Server
- All Implemented Interfaces:
- PacketListener
- public class Server
- extends Object
- implements PacketListener
Constructor Summary |
Server(int port)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Server
public Server(int port)
throws IOException
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