Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forever ping mode #97

Open
mzakharo opened this issue Nov 5, 2022 · 1 comment
Open

Forever ping mode #97

mzakharo opened this issue Nov 5, 2022 · 1 comment

Comments

@mzakharo
Copy link

mzakharo commented Nov 5, 2022

Is your feature request related to a problem? Please describe.
no

Describe the solution you'd like
First. It would be great to be able to run ping forever. A use-case is the collection of 24-7 logs.
Second. It would be useful to forward the result of a send_ping to another function as soon as it completes (for live plotting, etc...). Something like throwing a yield in the for loop for the executor.run function

Describe alternatives you've considered
I tried calling ping() with count=1, but this has a performance penalty, since this performs DNS query on every ping packet.

@alessandromaggio
Copy link
Owner

+1

I think having the possibility to yiled is great and we might get to something closer by implementing the async functionality (see #78), which however is more complex to implement than a single yield. For now, we keep this open until we clarify how to go about async.

Regarding the DNS penalty, it is OS-dependant rather than pythonping dependant because we rely on the OS for DNS queries and caching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants