Skip to content

nonblock::Proxy and match signal #401

Answered by diwic
pum-purum-pum-pum asked this question in Q&A
Discussion options

You must be logged in to vote

Have you looked at the tokio_client example? Maybe something like this (not tested) :

use SignalArgs;
let mr = ManagerServicesChanged::match_rule(None, "/");
let incoming_signal = conn.add_match(mr).await?.cb(|_, h: ManagerServicesChanged| {
    dbg!(h);
    true
});
// Make sure incoming_signal is not dropped here! Leak it if necessary

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@pum-purum-pum-pum
Comment options

Answer selected by pum-purum-pum-pum
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants