3.8.4 IrisRpc message format

IrisRpc messages transport JSON RPC 2.0 function calls, responses, and notifications.

The IrisRpc message format provides the following functionality:

  • Allows senders to send messages either in JSON, U64JSON, or another format.
  • Allows receivers to detect whether a message is in JSON, U64JSON, or another format.
  • Allows receivers to determine the length of a message, in order to efficiently read it without parsing the content of the message.
  • Allows receivers to detect when they are out of sync, and re-sync.

IrisJson format:



  • <ascii_decimal_content_length> is the length of <content> in bytes as a decimal ASCII number. This must not contain any leading zeros and must be at most ten decimal digits.
  • <content> is a JSON RPC 2.0-encoded function call, response, or notification.
  • <LF> is a byte with the value of 10.

IrisU64Json format:



  • <uint32_le_content_length> is the length of <content> in bytes as a 32-bit little-endian unsigned integer.
  • <content> is an array of little-endian encoded uint64_t values. It is a JSON RPC 2.0 and U64JSON-encoded request, response, or notification.

Senders must send messages in a format that is supported by the receiver. Senders know which formats are supported from the handshake. The format might change from message to message inside a session. An exception is connections that were initiated with JsonRpcOverHttp, which must use JsonRpcOverHttp by both sides for the session.

Receivers inspect the first few bytes of a received message to determine the format. When the format is unknown or not supported, they close the TCP connection immediately without reporting an error to the TCP peer.

Non-ConfidentialPDF file icon PDF version101196_0100_03_en
Copyright © 2018, 2019 Arm Limited or its affiliates. All rights reserved.