zeromq / zmq.rs

A native implementation of ØMQ in Rust
https://crates.io/crates/zeromq
MIT License
1.17k stars 102 forks source link

Detect Disconnection events on SUB socket? #201

Open ogabrielides opened 1 week ago

ogabrielides commented 1 week ago

How to detect Disconnection event on a PUB socket?

I used:

let mut monitor = socket.monitor(); and monitor.try_next() on a thread. The only event that I got is SocketEvent::Connected even if I manually stopped the Publisher side on purpose.

How to detect SocketEvent::Disconnected?

CableSynth commented 1 week ago

Hmm I'll have to try this out. I've been wanting to see if these work.

On Thu, Nov 14, 2024, 06:32 Odysseas Gabrielides @.***> wrote:

How to detect Disconnection event on a PUB socket?

I used:

let mut monitor = socket.monitor(); and monitor.try_next() on a thread. The only event that I got is SocketEvent::Connected even if I manually stopped the Publisher side on purpose.

How to detect SocketEvent::Disconnected?

— Reply to this email directly, view it on GitHub https://github.com/zeromq/zmq.rs/issues/201, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIQCA63DE54O6H73UJXNPL2ASC3TAVCNFSM6AAAAABRYVWNQSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGY2TQNJUGU2DIMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ogabrielides commented 1 week ago

@CableSynth Cool, let me know if you manage to do this