Class: DSP::ProtocolMessage
Overview
interface ProtocolMessage {
/** Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request. */
seq: number;
/** Message type.
Values: 'request', 'response', 'event', etc.
*/
type: string;
}
Instance Attribute Summary collapse
-
#seq ⇒ Object
type: number # type: string.
-
#type ⇒ Object
type: number # type: string.
Instance Method Summary collapse
Methods inherited from DSPBase
Constructor Details
This class inherits a constructor from DSP::DSPBase
Instance Attribute Details
#seq ⇒ Object
type: number # type: string
21 22 23 |
# File 'lib/dsp/dsp_protocol.rb', line 21 def seq @seq end |
#type ⇒ Object
type: number # type: string
21 22 23 |
# File 'lib/dsp/dsp_protocol.rb', line 21 def type @type end |
Instance Method Details
#from_h!(value) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/dsp/dsp_protocol.rb', line 23 def from_h!(value) value = {} if value.nil? self.seq = value['seq'] self.type = value['type'] self end |