nlib
nn::nlib::msgpack::jsonrpc::JsonRpcRequestReader Class Referencefinal

Class that reads the JSON-RPC request. More...

#include "nn/nlib/msgpack/jsonrpc/JsonRpcRequest.h"

Public Types

typedef Nlist< JsonRpcRequestListType
 Type used to store the JSON-RPC request sequence restored from the byte string.
 

Static Public Member Functions

static errno_t ReadRequest (const void *p, size_t n, ListType *request_list) noexcept
 Restores the JSON-RPC object from the byte string. More...
 

Detailed Description

Class that reads the JSON-RPC request.

Description
This class is used on the server side of JSON-RPC. Restores the byte string in the JsonRpcRequest order. The receiver of the actual byte string must be written by the user.
Not required when using JsonRpcServerExec for server processing. It is used within JsonRpcServerExec.

Definition at line 138 of file JsonRpcRequest.h.

Member Function Documentation

◆ ReadRequest()

nn::nlib::msgpack::jsonrpc::JsonRpcRequestReader::ReadRequest ( const void *  p,
size_t  n,
ListType request_list 
)
staticnoexcept

Restores the JSON-RPC object from the byte string.

Parameters
[in]pPointer to the JSON-RPC request byte string.
[in]nSize of the byte array.
[out]request_listPointer that stores the restored JsonRpcRequest order.
Return values
0Success.
EINVALp or request_list is NULL or n is 0.
ENOMEMmemory allocation failed.
Description
A value other than 0 indicates a mistake within the code, or a condition where the server side process cannot be continued. A normal error such as failing to parse the JSON returns 0, and the error is set to the response.

The documentation for this class was generated from the following files: