Class: SteamMist::Rcon
- Inherits:
-
Object
- Object
- SteamMist::Rcon
- Extended by:
- Forwardable
- Defined in:
- lib/steam_mist/rcon.rb,
lib/steam_mist/rcon/pass.rb,
lib/steam_mist/rcon/packet.rb,
lib/steam_mist/rcon/listener.rb,
lib/steam_mist/rcon/packet_factory.rb
Overview
This class provides RCON capabilities.
Defined Under Namespace
Classes: Listener, Packet, PacketFactory, Pass, TimeoutError
Instance Attribute Summary collapse
-
#pass ⇒ Pass
readonly
This is the class that handles reading and writing packets from the listener.
Instance Method Summary collapse
-
#initialize(ip, port = 27015) ⇒ Rcon
constructor
Initialize.
-
#inspect ⇒ String
Pretty inspect.
-
#send(hash) ⇒ Packet+
This takes a hash, turns it into a packet, and sends it.
Constructor Details
#initialize(ip, port = 27015) ⇒ Rcon
Initialize.
24 25 26 |
# File 'lib/steam_mist/rcon.rb', line 24 def initialize(ip, port = 27015) @pass = Pass.new(ip, port) end |
Instance Attribute Details
#pass ⇒ Pass (readonly)
This is the class that handles reading and writing packets from the listener.
18 19 20 |
# File 'lib/steam_mist/rcon.rb', line 18 def pass @pass end |
Instance Method Details
#inspect ⇒ String
Pretty inspect
39 40 41 |
# File 'lib/steam_mist/rcon.rb', line 39 def inspect "#<SteamMist::Rcon>" end |
#send(hash) ⇒ Packet+
This takes a hash, turns it into a packet, and sends it.
32 33 34 |
# File 'lib/steam_mist/rcon.rb', line 32 def send(hash) send_packet packet_factory.create_packet.load!(hash) end |