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

Bug fixes & IPv6 support #2

Merged
merged 9 commits into from
Nov 9, 2017
Merged

Conversation

JackSlateur
Copy link
Contributor

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

jack added 7 commits May 11, 2017 16:39
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>
Copy link
Contributor

@anton-belousov anton-belousov left a 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.

@@ -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)
Copy link
Contributor

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>
@JackSlateur
Copy link
Contributor Author

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 :)


return time_received - time_sent
if type != ICMP_ECHO_REPLY and type != ICMP6_ECHO_REPLY:
next
Copy link

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>
@JackSlateur
Copy link
Contributor Author

Humpf shame on me, thanks for the review

@anton-belousov anton-belousov merged commit c86f632 into stellarbit:master Nov 9, 2017
@anton-belousov
Copy link
Contributor

@JackSlateur, @bxwllzz, thank you very much for contributing & checking this. Will update the library soon.

Crypto-Spartan pushed a commit to Crypto-Spartan/aioping that referenced this pull request Oct 30, 2020
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

Successfully merging this pull request may close these issues.

3 participants