Class: WebRTC::DataChannelInit

Inherits:
Object
  • Object
show all
Defined in:
lib/webrtc/parity_types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ordered: true, max_packet_life_time: nil, max_retransmits: nil, protocol: '', negotiated: false, id: nil) ⇒ DataChannelInit

Returns a new instance of DataChannelInit.



191
192
193
194
195
196
197
198
199
# File 'lib/webrtc/parity_types.rb', line 191

def initialize(ordered: true, max_packet_life_time: nil, max_retransmits: nil, protocol: '', negotiated: false,
               id: nil)
  @ordered = ordered
  @max_packet_life_time = max_packet_life_time
  @max_retransmits = max_retransmits
  @protocol = protocol
  @negotiated = negotiated
  @id = id
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



189
190
191
# File 'lib/webrtc/parity_types.rb', line 189

def id
  @id
end

#max_packet_life_timeObject (readonly)

Returns the value of attribute max_packet_life_time.



189
190
191
# File 'lib/webrtc/parity_types.rb', line 189

def max_packet_life_time
  @max_packet_life_time
end

#max_retransmitsObject (readonly)

Returns the value of attribute max_retransmits.



189
190
191
# File 'lib/webrtc/parity_types.rb', line 189

def max_retransmits
  @max_retransmits
end

#negotiatedObject (readonly)

Returns the value of attribute negotiated.



189
190
191
# File 'lib/webrtc/parity_types.rb', line 189

def negotiated
  @negotiated
end

#orderedObject (readonly)

Returns the value of attribute ordered.



189
190
191
# File 'lib/webrtc/parity_types.rb', line 189

def ordered
  @ordered
end

#protocolObject (readonly)

Returns the value of attribute protocol.



189
190
191
# File 'lib/webrtc/parity_types.rb', line 189

def protocol
  @protocol
end

Instance Method Details

#to_hObject



201
202
203
204
205
206
207
208
209
210
# File 'lib/webrtc/parity_types.rb', line 201

def to_h
  {
    ordered: @ordered,
    max_packet_life_time: @max_packet_life_time,
    max_retransmits: @max_retransmits,
    protocol: @protocol,
    negotiated: @negotiated,
    id: @id
  }
end