-
Notifications
You must be signed in to change notification settings - Fork 31
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
Bug fixes & IPv6 support #2
Conversation
Signed-off-by: jack <jack@k-net.pro>
Signed-off-by: jack <jack@k-net.pro>
Signed-off-by: jack <jack@k-net.pro>
Signed-off-by: jack <jack@k-net.pro>
Signed-off-by: jack <jack@k-net.pro>
…s. Loop & filter until we find ours (or timeout) Signed-off-by: jack <jack@k-net.pro>
Signed-off-by: jack <jack@k-net.pro>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your changes! Everything is great, but I didn't get why do we need to use synchronous submission in when sending a request.
aioping/__init__.py
Outdated
@@ -211,8 +206,7 @@ def sendto_ready(packet, socket): | |||
) | |||
packet = header + data | |||
|
|||
callback = functools.partial(sendto_ready, packet=packet, socket=socket) | |||
asyncio.get_event_loop().add_writer(my_socket, callback) | |||
my_socket.sendto(packet, dest_addr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need a synchronous submission here?
Signed-off-by: jack <jack@k-net.pro>
Sorry for the delay and thanks for the review I am not sure how it should be done, there is a commit that should do better Tell me if it's still crap :) |
aioping/__init__.py
Outdated
|
||
return time_received - time_sent | ||
if type != ICMP_ECHO_REPLY and type != ICMP6_ECHO_REPLY: | ||
next |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
next
is a build-in function in python. Do you mean continue
?
Signed-off-by: Jack <jack@k-net.pro>
Humpf shame on me, thanks for the review |
@JackSlateur, @bxwllzz, thank you very much for contributing & checking this. Will update the library soon. |
Bug fixes & IPv6 support
Hi,
Please find a batch of commits I had to make
It mixes fixes (the code does not works for me as-is) and IPv6 support
Please tell me what you think, I can rebase it if you have issue with some parts or something