Module: Gt06Server::Protocol
- Defined in:
- lib/gt06_server/protocol.rb
Class Method Summary collapse
- .acknowledgment_pack_for(pack) ⇒ Object
-
.command_pack(command) ⇒ Object
TODO.
- .read_pack(io) ⇒ Object
- .replay_on(pack) ⇒ ServerAckPacket?
Class Method Details
.acknowledgment_pack_for(pack) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/gt06_server/protocol.rb', line 22 def acknowledgment_pack_for(pack) ack_pack = ServerAckPacket.new ack_pack.protocol_number = pack.payload.protocol_number ack_pack.serial_number = pack.payload.serial_number ack_pack end |
.command_pack(command) ⇒ Object
TODO
31 32 |
# File 'lib/gt06_server/protocol.rb', line 31 def command_pack(command) end |
.read_pack(io) ⇒ Object
8 9 10 |
# File 'lib/gt06_server/protocol.rb', line 8 def read_pack(io) TerminalPacket.read(io) end |
.replay_on(pack) ⇒ ServerAckPacket?
14 15 16 17 18 |
# File 'lib/gt06_server/protocol.rb', line 14 def replay_on(pack) if [:login_message, :status_information].include?(pack.payload..to_sym) acknowledgment_pack_for(pack) end end |