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

Use predefined socket either SOCK_DGRAM / SOCK_RAW on every invocation of ping API #76

Open
tkekan opened this issue Jan 11, 2024 · 1 comment

Comments

@tkekan
Copy link

tkekan commented Jan 11, 2024

There are use cases where this API is used by a service multiple times within a given minute. Wouldn't it be beneficial to have a predefined socket created and use the same socket for all send and/receive instead of creating a new socket on every invocation of the API i.e. avoid calling _create_socket on every invocation thus saving on socket lifecycle?

@tkekan tkekan changed the title Use predefined socket either SOCK_DGRAM / SOCK_RAW on every invocation of ping API. Use predefined socket either SOCK_DGRAM / SOCK_RAW on every invocation of ping API Jan 11, 2024
@ValentinBELYN
Copy link
Owner

Hi @tkekan,

Sorry for the delay. This is a good idea. I'll see how I can implement this.

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