Method: Invoker::IPC::Message::Serialization#encoded_message

Defined in:
lib/invoker/ipc/message.rb

#encoded_messageObject



21
22
23
24
25
26
# File 'lib/invoker/ipc/message.rb', line 21

def encoded_message
  json_data = to_json
  json_size = json_data.length.to_s
  length_str = json_size.rjust(Invoker::IPC::INITIAL_PACKET_SIZE, '0')
  length_str + json_data
end