#rpc-server #message #serialization #messagepack #pack #data #implemenation

msgrpc

An rpc server implemenation that uses message pack for data serialization

1 unstable release

0.1.0 Nov 12, 2020

#6 in #implemenation

Apache-2.0

9KB
170 lines

msg-rpc

An rpc server implementation using msgpack

Usage

Add the crate to the dependencies

[dependencies]
msgrpc = {git = "https://github.com/flotte-goes-smart/msg-rpc/tree/main"}
pub fn main() {
    let mut server = RPCServer::new("127.0.0.1:".to_string());
    let mut receiver = Arc::clone(&server.receiver);
    thread::spawn(move || {
        server.start();        
    });
    for handler in receiver {
        // handle the message and return a response
    }
}

Dependencies

~1.2–7MB
~34K SLoC