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

Multiple uses of MultiPing() // return of receive() #13

Open
sausix opened this issue Jun 6, 2018 · 0 comments
Open

Multiple uses of MultiPing() // return of receive() #13

sausix opened this issue Jun 6, 2018 · 0 comments

Comments

@sausix
Copy link

sausix commented Jun 6, 2018

The same MultiPing instance can't be used twice.
It's ugly to create a new object if you want to ping to the same address again.
At least some kind of reset() method would be great.

    pinger = MultiPing(['192.168.112.1'])

    pinger.send()
    ok, nok = pinger.receive(2)
    print(ok, nok)

    time.sleep(3)

    pinger.send()
    ok, nok = pinger.receive(2)
    print(ok, nok)

multiping.MultiPingError: No responses pending


receive() returns a tuple[dict, list].
Is there a reason for that? If i send two packets at once, what seems to be allowed in this way, only one response per given destination is being returned.
MultiPing(['192.168.112.1', '192.168.112.1'])

{'192.168.112.1': 0.0020570755004882812} []

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

1 participant