msgrpc

Crates.iomsgrpc
lib.rsmsgrpc
version0.1.0
sourcesrc
created_at2020-11-12 20:56:16.985579
updated_at2020-11-12 20:56:16.985579
descriptionAn rpc server implemenation that uses message pack for data serialization
homepage
repositoryhttps://github.com/fLotte-meets-HWR-DB/msg-rpc
max_upload_size
id311751
size20,056
Julius Riegel (Trivernis)

documentation

README

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
    }
}
Commit count: 13

cargo fmt