jsonrpc-v2 icon indicating copy to clipboard operation
jsonrpc-v2 copied to clipboard

Is this lib support tcp protocol?

Open vCassius opened this issue 1 year ago • 1 comments

Is this lib support tcp protocol or only http layer?

vCassius avatar Sep 12 '23 08:09 vCassius

It's mostly agnostic—you can put in bytes/request and get out a serializable response. The current "integrations" (actix-web and hyper) are at the HTTP layer, but these are pretty thin wrappers around the main jsonrpc_v2::Server: https://github.com/kardeiz/jsonrpc-v2/blob/16ec062ec3e9f83f95458bbb5e5bc6a599adbf75/src/lib.rs#L1176

So, it shouldn't be too much work to get it set up with a TcpStream.

kardeiz avatar Sep 12 '23 12:09 kardeiz