Class: MasterServerSocket
- Inherits:
-
Object
- Object
- MasterServerSocket
- Includes:
- SteamSocket
- Defined in:
- lib/steam/sockets/master_server_socket.rb
Overview
This class represents a socket used to communicate with master servers
Instance Method Summary collapse
-
#reply ⇒ SteamPacket
Reads a single packet from the socket.
Methods included from SteamSocket
#close, #initialize, #receive_packet, #send, timeout=
Instance Method Details
#reply ⇒ SteamPacket
Reads a single packet from the socket
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/steam/sockets/master_server_socket.rb', line 20 def reply receive_packet 1500 unless @buffer.long == 0xFFFFFFFF raise PacketFormatError, 'Master query response has wrong packet header.' end packet = SteamPacketFactory.packet_from_data @buffer.get puts "Got reply of type \"#{packet.class.to_s}\"." if $DEBUG packet end |