net.barkerjr.gameserver.valve
Class GoldSourceServer
java.lang.Object
net.barkerjr.gameserver.Base
net.barkerjr.gameserver.GameServer
net.barkerjr.gameserver.UdpServer
net.barkerjr.gameserver.valve.ValveServer
net.barkerjr.gameserver.valve.GoldSourceServer
- All Implemented Interfaces:
- Closeable
public class GoldSourceServer
- extends ValveServer
Provides parsing and Gold-Source-specific server query handling. Gold Source
is the Half-Life 1 engine.
- Since:
- 2007-10-25
- 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 |
| 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 |
GoldSourceServer
@Deprecated
public GoldSourceServer(InetAddress ip)
- Deprecated. since 2007-11-10, use
GoldSourceServer(InetSocketAddress)
- Creates a server for the Valve Gold Source engine, defaulting to port
27015
- Parameters:
ip - the IP address of the server- Since:
- 2007-10-25
GoldSourceServer
@Deprecated
public GoldSourceServer(InetAddress ip,
int port)
- Deprecated. since 2007-11-10, use
GoldSourceServer(InetSocketAddress)
- Creates a server for the Valve Gold Source engine
- Parameters:
ip - the IP address of the serverport - the port of the server- Since:
- 2007-10-25
GoldSourceServer
public GoldSourceServer(InetSocketAddress address)
- Creates a server for the Valve Gold Source engine
- Parameters:
address - the address of the server- Since:
- 2007-11-10
getInstance
public static GoldSourceServer 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:
- 2007-11-18
parsePacketNumber
protected SequenceDvo parsePacketNumber(ReplyStream buffer)
- Parses the next byte for the packet sequence numbers.
Determines which packet in the multi-packet response this is
- Specified by:
parsePacketNumber in class ValveServer
- Parameters:
buffer - the packet data
- Returns:
- a DVO containing this packet's sequence number, and the total
number of packets to expect
- Since:
- 2007-10-25
sendRcon
public String sendRcon(String command)
throws FailedLoginException,
SocketTimeoutException
- Description copied from class:
ValveServer
- Sends the given command to the server and waits for a reply.
- Specified by:
sendRcon in class ValveServer
- Parameters:
command - the command to send
- Returns:
- the response from the server
- Throws:
FailedLoginException - if the password set by
ValveServer.setRconPassword(String) is bad
SocketTimeoutException - if there was an error contacting the server- Since:
- 2008-02-03
- See Also:
Rcon.send(int, String, int, String, String)
loadChallenge
protected void loadChallenge()
throws IOException
- Workaround for broken A2S_SERVERQUERY_GETCHALLENGE
Requests (Asynchronously) the challenge code from the server
- Overrides:
loadChallenge in class ValveServer
- Throws:
IOException - if there was an error sending the request- Since:
- 2008-11-26
- See Also:
- Problem