This package implements a MessagePack RPC point-to-point communication. The actors on each side of the communication can perform RPC calls to the other side so, technically, they can act simultaneously as client or server. By the way, for the sake of simplicity, from now on we will refer to them simply with "client".
The protocol supported is defined here https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md. We have 3 types of messages defined as:
-
REQUEST: this message is an array of 4 elements containing in order:
type: Fixed as number0(to identify the message as a REQUEST).msgid: A message ID, a 32-bit unsigned integer used as a sequence number to match the response (the server's response to the REQUEST will have the samemsgid).method: A string containing the called method name.params: An array of the function arguments.
-
RESPONSE: this message is an array of 4 elements containing in order:
type: Fixed as number1(to identify the message as a RESPONSE).msgid: A message ID.error: The error returned from the method, ornullif the method was successful.result: The result of the method. It should benullif an error occurred.
-
NOTIFICATION: this message is an array of 3 elements containing in order:
type: Fixed number2(to identify this message as a NOTIFICATION).methods: The method name.params: An array of the function parameters.
SPDX-FileCopyrightText: Arduino s.r.l. and/or its affiliated companies
SPDX-License-Identifier: GPL-3.0-or-later