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
90c68cce99
Signed-off-by: trivernis <trivernis@protonmail.com> |
4 years ago | |
---|---|---|
src | 4 years ago | |
.gitignore | 4 years ago | |
Cargo.toml | 4 years ago | |
README.md | 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
}
}