|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectnet.barkerjr.gameserver.Base
net.barkerjr.gameserver.GameServer
net.barkerjr.gameserver.UdpServer
public abstract class UdpServer
Provides generic parsing and querying servers via UDP
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.barkerjr.gameserver.GameServer |
|---|
GameServer.Dedicated, GameServer.Request, GameServer.RequestTimeoutException |
| Field Summary | |
|---|---|
protected static Map<InetSocketAddress,UdpServer> |
servers
The servers which are active |
| Fields inherited from class net.barkerjr.gameserver.GameServer |
|---|
address, botCount, dedicated, gameDirectory, IPTOS_RELIABILITY, map, maximumPlayers, name, namespace, numberOfPlayers, passwordRequired, players, plugins, rules, updated, version |
| Fields inherited from class net.barkerjr.gameserver.Base |
|---|
listeners |
| Constructor Summary | |
|---|---|
UdpServer(InetAddress ip,
int port)
Deprecated. since 2007-11-10, use UdpServer(InetSocketAddress) |
|
UdpServer(InetSocketAddress address)
Sets up the basic server information and DOM |
|
| Method Summary | |
|---|---|
void |
close()
Removes internal references to this server |
protected abstract void |
parseData(byte[] data)
Parses the given data |
protected void |
sendData(byte[] data)
Sends the given data to the server |
protected void |
sendData(String data)
Sends the given data to the server |
| Methods inherited from class net.barkerjr.gameserver.GameServer |
|---|
addPlugin, equals, fireChangeEvent, fireLoadEvent, getBotCount, getDedicated, getGameDirectory, getIP, getMap, getMaximumPlayers, getName, getNumberOfPlayers, getPlayers, getPlugins, getPort, getRules, getUpdated, getVersion, handleError, hashCode, isPasswordRequired, load, load, replaceChild, toJsonObject, toString, toXmlDocument |
| Methods inherited from class net.barkerjr.gameserver.Base |
|---|
addListener, removeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final Map<InetSocketAddress,UdpServer> servers
| Constructor Detail |
|---|
@Deprecated
public UdpServer(InetAddress ip,
int port)
UdpServer(InetSocketAddress)
ip - the IP address of the serverport - the port of the serverpublic UdpServer(InetSocketAddress address)
address - the address of the server| Method Detail |
|---|
protected abstract void parseData(byte[] data)
throws IOException
data - the bytes in the packet
IOException - if there is a problempublic void close()
close in interface Closeable
protected void sendData(String data)
throws IOException
data - the data to send
IOException - if there was an error sending the request
protected void sendData(byte[] data)
throws IOException
data - the data to send
IOException - if there was an error sending the request
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||