An rpc server implementation using msgpack
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Trivernis 7aa960c6ed
Merge pull request #2 from fLotte-meets-HWR-DB/actions
Add Rust Action
4 years ago
.github/workflows Create rust.yml 4 years ago
src Add scheduled thread pool 4 years ago
.gitignore Add Message struct and implementation 4 years ago
Cargo.toml Add license and crates.io metadata 4 years ago
LICENSE Add license and crates.io metadata 4 years ago
README.md Update README 4 years ago

README.md

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