Class: Steam::Handler::Auth
- Inherits:
-
Object
- Object
- Steam::Handler::Auth
- Includes:
- Base
- Defined in:
- lib/steam/handler/auth.rb
Overview
Steam Auth handler. Handles channel encryption and decryption.
Instance Attribute Summary
Attributes included from Base
Instance Method Summary collapse
-
#handle(packet) ⇒ Object
Handles the given packet.
-
#initialize ⇒ Auth
constructor
Override the constructor to set our key to nil.
Methods included from Base
#handles?, included, #send_msg
Constructor Details
#initialize ⇒ Auth
Override the constructor to set our key to nil. This key will be used if the encryption is a success to decode and encode all future packet data.
23 24 25 26 |
# File 'lib/steam/handler/auth.rb', line 23 def initialize(*) super @key = nil end |
Instance Method Details
#handle(packet) ⇒ Object
Handles the given packet. This handler is only concerned about the channel encryption request and result.
32 33 34 35 36 37 38 39 |
# File 'lib/steam/handler/auth.rb', line 32 def handle(packet) case packet.msg_type when EMsg::CHANNEL_ENCRYPT_REQUEST handle_channel_encrypt_request(packet) when EMsg::CHANNEL_ENCRYPT_RESULT handle_channel_encrypt_result(packet) end end |