In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about the analysis of the .NET open source project StreamJsonRpc. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article. Let's take a look at it.
StreamJsonRpc is an open source .NET library that implements the JSON-RPC communication protocol. Before introducing StreamJsonRpc, let's take a look at JSON-RPC.
JSON-RPC introduction
JSON-RPC is a stateless and lightweight remote procedure call (RPC) protocol that uses JSON (RFC 4627) as the data format.
At present, the version of JSON-RPC has been developed to 2.0 JSON RPC 2.0 and 1.0, which is different from the convention specification. 2. 0 contains a member named jsonrpc with a value of 2. 0, while version 1. 0 does not. So we can easily distinguish 2.0 between the two versions.
All member names exchanged by JSON-RPC between client and server should be case-sensitive, and functions, methods, and procedures are considered interchangeable. The client is defined as the source of the request object and the handler of the response object; the server is defined as the origin of the response object and the handler of the request object.
Request object
Sending a request object to the server represents a RPC call, and JSON-RPC 2.0 specifies that a request object contains the following members:
Jsonrpc: a string that specifies the version of the JSON-RPC protocol, which must be accurately written as "2.0".
Method: a string containing the name of the method to be called, the method name starting with rpc, concatenated with an English period as the method name and extension reserved for rpc, and cannot be used elsewhere.
Params: the structured parameter value required to invoke the method, which can be omitted.
Id: a unique identity of the client has been established, and the value must contain a string, numeric value, or NULL null value. If the member is not included, it is considered to be a notification. This value is generally not NULL, if it is a numeric value, it should not contain decimals.
The request object that does not contain id members is notification, and the request object as notification indicates that the client is not interested in the server response, and the server can not respond to the request object to the client.
Here are several examples of the JSON structure of the request object ("-->" indicates sending, "
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.