net.barkerjr.gameserver.valve
Class OrangeBoxServer
java.lang.Object
net.barkerjr.gameserver.Base
net.barkerjr.gameserver.GameServer
net.barkerjr.gameserver.UdpServer
net.barkerjr.gameserver.valve.ValveServer
net.barkerjr.gameserver.valve.SourceServer
net.barkerjr.gameserver.valve.OrangeBoxServer
- All Implemented Interfaces:
- Closeable
- Direct Known Subclasses:
- Left4DeadServer
public class OrangeBoxServer
- extends SourceServer
Provides parsing and Orange-Box-specific server query handling. Orange Box
is the Half-Life 2: Episode 2 engine.
- Since:
- 2010-03-17
- Author:
- BarkerJr
- See Also:
- Specification
| 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 |
|
Method Summary |
static OrangeBoxServer |
getInstance(InetSocketAddress address)
Gets or creates an instance of the server at the given address. |
protected void |
loadChallenge()
Requests A2S_PLAYER instead of A2S_SERVERQUERY_GETCHALLENGE, which is
broken
Requests (Asynchronously) the challenge code from the server |
protected SequenceDvo |
parsePacketNumber(ReplyStream buffer)
Parses the next two bytes for the packet sequence numbers
Determines which packet in the multi-packet response this is |
| Methods inherited from class net.barkerjr.gameserver.valve.ValveServer |
getApplicationId, getGameDescription, getOperatingSystem, getShip, handleMessage, handlePlayers, isVacSecure, load, loadInformation, loadPlayers, loadRules, parseData, sendRcon, setRconPassword, toJsonObject |
| 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, replaceChild, toString, toXmlDocument |
OrangeBoxServer
public OrangeBoxServer(InetSocketAddress address)
- Creates a server for the Valve Orange Box Source engine
- Parameters:
address - the address of the server- Since:
- 2010-03-17
getInstance
public static OrangeBoxServer getInstance(InetSocketAddress address)
- Gets or creates an instance of the server at the given address.
- Parameters:
address - the address of the server
- Returns:
- the server
- Since:
- 2010-03-17
parsePacketNumber
protected SequenceDvo parsePacketNumber(ReplyStream buffer)
- Description copied from class:
SourceServer
- Parses the next two bytes for the packet sequence numbers
Determines which packet in the multi-packet response this is
- Overrides:
parsePacketNumber in class SourceServer
- Parameters:
buffer - the packet data
- Returns:
- a DVO containing this packet's sequence number, and the total
number of packets to expect
- Since:
- 2010-03-17
loadChallenge
protected void loadChallenge()
throws IOException
- Requests A2S_PLAYER instead of A2S_SERVERQUERY_GETCHALLENGE, which is
broken
Requests (Asynchronously) the challenge code from the server
- Overrides:
loadChallenge in class ValveServer
- Throws:
IOException - if there was an error sending the request- Since:
- 2010-03-17