net.barkerjr.gameserver.valve
Class SourceServer
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
- All Implemented Interfaces:
- Closeable
- Direct Known Subclasses:
- OrangeBoxServer
public class SourceServer
- extends ValveServer
Provides parsing and Source-specific server query handling. Source is the
Half-Life 2 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, loadChallenge, 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 |
SourceServer
@Deprecated
public SourceServer(InetAddress ip)
- Deprecated. since 2007-11-10, use
SourceServer(InetSocketAddress)
- Creates a server for the Valve Source engine, defaulting to port 27015
- Parameters:
ip - the IP address of the server- Since:
- 2007-10-25
SourceServer
@Deprecated
public SourceServer(InetAddress ip,
int port)
- Deprecated. since 2007-11-10, use
SourceServer(InetSocketAddress)
- Creates a server for the Valve Source engine
- Parameters:
ip - the IP address of the serverport - the port of the server- Since:
- 2007-10-25
SourceServer
public SourceServer(InetSocketAddress address)
- Creates a server for the Valve Source engine
- Parameters:
address - the address of the server- Since:
- 2007-11-10
getInstance
public static SourceServer 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 two bytes 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:
SourceRcon.send(String, int, String, String)