windy1 / zeroconf-rs

zeroconf is a cross-platform library that wraps underlying ZeroConf/mDNS implementations such as Bonjour or Avahi, providing an easy and idiomatic way to both register and browse services.
MIT License
77 stars 25 forks source link

Use abstract even loop/polling service. #2

Closed eskimor closed 2 years ago

eskimor commented 3 years ago

This allows for replacing it with one that works well with async frameworks in Rust.

TODO:

  1. Implement this also on Mac
  2. Think about getting rid of TMdnsService::register and replace it with TMdnsService::register_with_poll, this would allow for getting rid of the new generic Poll type parameter and instead using a modified AvahiEventLoop directly, which wraps a plain AvahiPoll instead of an AvahiSimplePoll.

Also this is still completely untested - I have a zeroconf-async repo which is also finished code wise, but is also not yet tested at all. Just saying, in case someone is interested before I get to it ;-)

eskimor commented 3 years ago

This is meant as a first step into implementing #1 . A very first iteration of an AvahiPoll working together with async code can be found here. This is all still in development and very likely to change a lot and probably not even working. Especially multithreading might be hairy.

windy1 commented 2 years ago

Closing as draft PR appears to be inactive