2 releases
0.1.1 | Mar 21, 2019 |
---|---|
0.1.0 | Mar 21, 2019 |
#25 in #jsonrpc
19KB
467 lines
jsonrpc-parse
parse JSON-RPC (2.0) from TCP Bytes or deparse JSON-RPC to Codec and Bytes
[dependencies]
jsonrpc_parse = "1.0"
use jsonrpc_parse::httpcodec::{HTTPCodec, HTTP};
// if msg is HTTPCodec's HTTP
match msg {
HTTP::Request(req) => {}
HTTP::Response(resp) => {}
_ => {} // other is Response about the Error, can return direct.
}
Dependencies
~1.8–2.9MB
~57K SLoC