Class: SteamCondenser::Servers::Packets::RCON::RCONGoldSrcResponse

Inherits:
Object
  • Object
show all
Includes:
BasePacket
Defined in:
lib/steam-condenser/servers/packets/rcon/rcon_goldsrc_response.rb

Overview

This packet class represents a RCON response packet sent by a GoldSrc server

It is used to transport the output of a command from the server to the client which requested the command execution.

See Also:

Author:

  • Sebastian Staudt

Constant Summary

Constants included from BasePacket

BasePacket::A2M_GET_SERVERS_BATCH2_HEADER, BasePacket::A2S_INFO_HEADER, BasePacket::A2S_PLAYER_HEADER, BasePacket::A2S_RULES_HEADER, BasePacket::A2S_SERVERQUERY_GETCHALLENGE_HEADER, BasePacket::C2M_CHECKMD5_HEADER, BasePacket::M2A_SERVER_BATCH_HEADER, BasePacket::RCON_GOLDSRC_CHALLENGE_HEADER, BasePacket::RCON_GOLDSRC_NO_CHALLENGE_HEADER, BasePacket::RCON_GOLDSRC_RESPONSE_HEADER, BasePacket::S2A_INFO2_HEADER, BasePacket::S2A_INFO_DETAILED_HEADER, BasePacket::S2A_PLAYER_HEADER, BasePacket::S2A_RULES_HEADER, BasePacket::S2C_CHALLENGE_HEADER, BasePacket::S2C_CONNREJECT_HEADER

Instance Method Summary collapse

Methods included from BasePacket

#to_s

Constructor Details

#initialize(command_response) ⇒ RCONGoldSrcResponse

Creates a RCON command response for the given command output


26
27
28
# File 'lib/steam-condenser/servers/packets/rcon/rcon_goldsrc_response.rb', line 26

def initialize(command_response)
  super RCON_GOLDSRC_RESPONSE_HEADER, command_response
end

Instance Method Details

#responseString

Returns the output of the command execution


33
34
35
# File 'lib/steam-condenser/servers/packets/rcon/rcon_goldsrc_response.rb', line 33

def response
  @content_data.string[0..-3]
end