Class: UdpHeader

Inherits:
Object
  • Object
show all
Includes:
SteamSerializable
Defined in:
lib/steamd/generated/netheader.rb

Overview

Class for the UdpHeader in the Steam Language.

Constant Summary collapse

MAGIC =

MAGIC constant

0x31305356

Instance Attribute Summary

Attributes included from SteamSerializable

#constants, #variables

Instance Method Summary collapse

Methods included from SteamSerializable

#consts, #deserialize, #encode_to, #flag, #serialize, #vars

Constructor Details

#initializeUdpHeader

Instantiate a UdpHeader object



9
10
11
12
13
14
# File 'lib/steamd/generated/netheader.rb', line 9

def initialize
  super([{:name=>"magic", :type=>"uint", :modifier=>nil, :value=>"UdpHeader::MAGIC", :size=>nil, :modifier_size=>nil}, {:name=>"payload_size", :type=>"ushort", :modifier=>nil, :value=>nil, :size=>nil, :modifier_size=>nil}, {:name=>"packet_type", :type=>"EUdpPacketType", :modifier=>nil, :value=>"EUdpPacketType::INVALID", :size=>nil, :modifier_size=>nil}, {:name=>"flags", :type=>"byte", :modifier=>nil, :value=>nil, :size=>nil, :modifier_size=>nil}, {:name=>"source_conn_id", :type=>"uint", :modifier=>nil, :value=>512, :size=>nil, :modifier_size=>nil}, {:name=>"dest_conn_id", :type=>"uint", :modifier=>nil, :value=>nil, :size=>nil, :modifier_size=>nil}, {:name=>"seq_this", :type=>"uint", :modifier=>nil, :value=>nil, :size=>nil, :modifier_size=>nil}, {:name=>"seq_ack", :type=>"uint", :modifier=>nil, :value=>nil, :size=>nil, :modifier_size=>nil}, {:name=>"packets_in_msg", :type=>"uint", :modifier=>nil, :value=>nil, :size=>nil, :modifier_size=>nil}, {:name=>"msg_start_seq", :type=>"uint", :modifier=>nil, :value=>nil, :size=>nil, :modifier_size=>nil}, {:name=>"msg_size", :type=>"uint", :modifier=>nil, :value=>nil, :size=>nil, :modifier_size=>nil}], [{:name=>"MAGIC", :type=>"uint", :modifier=>"const", :value=>"0x31305356", :size=>nil, :modifier_size=>nil}])
  self.magic = UdpHeader::MAGIC
  self.packet_type = EUdpPacketType::INVALID
  self.source_conn_id = 512
end

Instance Method Details

#dest_conn_iduint

Note:

defaults to

Gets the dest_conn_id variable.

Returns:

  • (uint)

    the value of dest_conn_id



95
96
97
# File 'lib/steamd/generated/netheader.rb', line 95

def dest_conn_id
  @variables['dest_conn_id'][:value]
end

#dest_conn_id=(value) ⇒ Object

Sets the dest_conn_id variable.

Parameters:

  • value (uint)

    the new value



102
103
104
# File 'lib/steamd/generated/netheader.rb', line 102

def dest_conn_id=(value)
  @variables['dest_conn_id'][:value] = value
end

#flagsbyte

Note:

defaults to

Gets the flags variable.

Returns:

  • (byte)

    the value of flags



65
66
67
# File 'lib/steamd/generated/netheader.rb', line 65

def flags
  @variables['flags'][:value]
end

#flags=(value) ⇒ Object

Sets the flags variable.

Parameters:

  • value (byte)

    the new value



72
73
74
# File 'lib/steamd/generated/netheader.rb', line 72

def flags=(value)
  @variables['flags'][:value] = value
end

#magicuint

Note:

defaults to UdpHeader::MAGIC

Gets the magic variable.

Returns:

  • (uint)

    the value of magic



20
21
22
# File 'lib/steamd/generated/netheader.rb', line 20

def magic
  @variables['magic'][:value]
end

#magic=(value) ⇒ Object

Sets the magic variable.

Parameters:

  • value (uint)

    the new value



27
28
29
# File 'lib/steamd/generated/netheader.rb', line 27

def magic=(value)
  @variables['magic'][:value] = value
end

#msg_sizeuint

Note:

defaults to

Gets the msg_size variable.

Returns:

  • (uint)

    the value of msg_size



170
171
172
# File 'lib/steamd/generated/netheader.rb', line 170

def msg_size
  @variables['msg_size'][:value]
end

#msg_size=(value) ⇒ Object

Sets the msg_size variable.

Parameters:

  • value (uint)

    the new value



177
178
179
# File 'lib/steamd/generated/netheader.rb', line 177

def msg_size=(value)
  @variables['msg_size'][:value] = value
end

#msg_start_sequint

Note:

defaults to

Gets the msg_start_seq variable.

Returns:

  • (uint)

    the value of msg_start_seq



155
156
157
# File 'lib/steamd/generated/netheader.rb', line 155

def msg_start_seq
  @variables['msg_start_seq'][:value]
end

#msg_start_seq=(value) ⇒ Object

Sets the msg_start_seq variable.

Parameters:

  • value (uint)

    the new value



162
163
164
# File 'lib/steamd/generated/netheader.rb', line 162

def msg_start_seq=(value)
  @variables['msg_start_seq'][:value] = value
end

#packet_typeEUdpPacketType

Note:

defaults to EUdpPacketType::INVALID

Gets the packet_type variable.

Returns:



50
51
52
# File 'lib/steamd/generated/netheader.rb', line 50

def packet_type
  @variables['packet_type'][:value]
end

#packet_type=(value) ⇒ Object

Sets the packet_type variable.

Parameters:



57
58
59
# File 'lib/steamd/generated/netheader.rb', line 57

def packet_type=(value)
  @variables['packet_type'][:value] = value
end

#packets_in_msguint

Note:

defaults to

Gets the packets_in_msg variable.

Returns:

  • (uint)

    the value of packets_in_msg



140
141
142
# File 'lib/steamd/generated/netheader.rb', line 140

def packets_in_msg
  @variables['packets_in_msg'][:value]
end

#packets_in_msg=(value) ⇒ Object

Sets the packets_in_msg variable.

Parameters:

  • value (uint)

    the new value



147
148
149
# File 'lib/steamd/generated/netheader.rb', line 147

def packets_in_msg=(value)
  @variables['packets_in_msg'][:value] = value
end

#payload_sizeushort

Note:

defaults to

Gets the payload_size variable.

Returns:

  • (ushort)

    the value of payload_size



35
36
37
# File 'lib/steamd/generated/netheader.rb', line 35

def payload_size
  @variables['payload_size'][:value]
end

#payload_size=(value) ⇒ Object

Sets the payload_size variable.

Parameters:

  • value (ushort)

    the new value



42
43
44
# File 'lib/steamd/generated/netheader.rb', line 42

def payload_size=(value)
  @variables['payload_size'][:value] = value
end

#seq_ackuint

Note:

defaults to

Gets the seq_ack variable.

Returns:

  • (uint)

    the value of seq_ack



125
126
127
# File 'lib/steamd/generated/netheader.rb', line 125

def seq_ack
  @variables['seq_ack'][:value]
end

#seq_ack=(value) ⇒ Object

Sets the seq_ack variable.

Parameters:

  • value (uint)

    the new value



132
133
134
# File 'lib/steamd/generated/netheader.rb', line 132

def seq_ack=(value)
  @variables['seq_ack'][:value] = value
end

#seq_thisuint

Note:

defaults to

Gets the seq_this variable.

Returns:

  • (uint)

    the value of seq_this



110
111
112
# File 'lib/steamd/generated/netheader.rb', line 110

def seq_this
  @variables['seq_this'][:value]
end

#seq_this=(value) ⇒ Object

Sets the seq_this variable.

Parameters:

  • value (uint)

    the new value



117
118
119
# File 'lib/steamd/generated/netheader.rb', line 117

def seq_this=(value)
  @variables['seq_this'][:value] = value
end

#source_conn_iduint

Note:

defaults to 512

Gets the source_conn_id variable.

Returns:

  • (uint)

    the value of source_conn_id



80
81
82
# File 'lib/steamd/generated/netheader.rb', line 80

def source_conn_id
  @variables['source_conn_id'][:value]
end

#source_conn_id=(value) ⇒ Object

Sets the source_conn_id variable.

Parameters:

  • value (uint)

    the new value



87
88
89
# File 'lib/steamd/generated/netheader.rb', line 87

def source_conn_id=(value)
  @variables['source_conn_id'][:value] = value
end