Class: UState::Message

Inherits:
Object
  • Object
show all
Includes:
Beefcake::Message
Defined in:
lib/ustate/message.rb

Instance Method Summary collapse

Instance Method Details

#encode_with_lengthObject



10
11
12
13
14
# File 'lib/ustate/message.rb', line 10

def encode_with_length
  buffer = ''
  encoded = encode buffer
  "#{[encoded.length].pack('N')}#{encoded}"
end