Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 503 Bytes

README.md

File metadata and controls

25 lines (20 loc) · 503 Bytes

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
    }
}