feat(msgpack_rpc): support out-of-order responses on msgpack-rpc

Added to support MessagePack-RPC fully compliant clients that do
not return responses in request order.

Although it is currently not an efficient implementation for full
compliance and full compliance cannot be guaranteed, the addition
of the new client type `msgpack-rpc` creates a situation where "if
the client type is `msgpack-rpc`, then backward compatibility is
ignored and full compliance with MessagePack- RPC compliance is
justified even if backward compatibility is ignored if the client
type is `msgpack-rpc`.
This commit is contained in:
Alisue
2023-08-06 23:19:29 +09:00
parent deb6fd6704
commit 01fe6b9e6a
3 changed files with 51 additions and 7 deletions

View File

@@ -6730,7 +6730,7 @@ static void f_rpcrequest(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
const char *name = NULL;
Channel *chan = find_channel(chan_id);
if (chan) {
name = rpc_client_name(chan);
name = get_client_info(chan, "name");
}
msg_ext_set_kind("rpc_error");
if (name) {