net.barkerjr.gameserver.valve
Class Left4DeadServer

java.lang.Object
  extended by net.barkerjr.gameserver.Base
      extended by net.barkerjr.gameserver.GameServer
          extended by net.barkerjr.gameserver.UdpServer
              extended by net.barkerjr.gameserver.valve.ValveServer
                  extended by net.barkerjr.gameserver.valve.SourceServer
                      extended by net.barkerjr.gameserver.valve.OrangeBoxServer
                          extended by net.barkerjr.gameserver.valve.Left4DeadServer
All Implemented Interfaces:
Closeable

public class Left4DeadServer
extends OrangeBoxServer

Provides workarounds for bugs Valve introduced to Left4Dead circa September 29, 2009

Since:
2009-10-06
Author:
BarkerJr

Nested Class Summary
 
Nested classes/interfaces inherited from class net.barkerjr.gameserver.valve.ValveServer
ValveServer.OperatingSystem
 
Nested classes/interfaces inherited from class net.barkerjr.gameserver.GameServer
GameServer.Dedicated, GameServer.Request, GameServer.RequestTimeoutException
 
Field Summary
 
Fields inherited from class net.barkerjr.gameserver.valve.ValveServer
rconPassword
 
Fields inherited from class net.barkerjr.gameserver.UdpServer
servers
 
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
Left4DeadServer(InetSocketAddress address)
          Creates a server for the Left 4 Dead game
 
Method Summary
static Left4DeadServer getInstance(InetSocketAddress address)
          Gets or creates an instance of the server at the given address.
protected  void handlePlayers(ReplyStream stream)
          Generates its own Index, since Left 4 Dead servers always use an Index of zero Handles D (Players) responses from the server
 
Methods inherited from class net.barkerjr.gameserver.valve.OrangeBoxServer
loadChallenge, parsePacketNumber
 
Methods inherited from class net.barkerjr.gameserver.valve.SourceServer
sendRcon
 
Methods inherited from class net.barkerjr.gameserver.valve.ValveServer
getApplicationId, getGameDescription, getOperatingSystem, getShip, handleMessage, isVacSecure, load, loadInformation, loadPlayers, loadRules, parseData, sendRcon, setRconPassword, toJsonObject
 
Methods inherited from class net.barkerjr.gameserver.UdpServer
close, sendData, sendData
 
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
 
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
 

Constructor Detail

Left4DeadServer

public Left4DeadServer(InetSocketAddress address)
Creates a server for the Left 4 Dead game

Parameters:
address - the address of the server
Since:
2009-10-06
Method Detail

getInstance

public static Left4DeadServer 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:
2009-10-06

handlePlayers

protected void handlePlayers(ReplyStream stream)
Generates its own Index, since Left 4 Dead servers always use an Index of zero Handles D (Players) responses from the server

Overrides:
handlePlayers in class ValveServer
Parameters:
stream - the message from the server
Since:
2009-10-06