-
Notifications
You must be signed in to change notification settings - Fork 12
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
Non blocking receiving for async codes #20
Comments
You can run |
I'm working with UDP, still seems to block , hmm, my code is like this: nc = nclib.Netcat(listen=9999, udp=True).settimeout(0) and it won't let me continue with rest of the async tasks |
Seems to be the same with TCP |
Oh, I didn't realize you were talking about initializing a listening service. I don't know if it's possible to not block for that... as far as I know, UDP needs to block on startup in order to determine what the address we should send to should be, and TCP needs to block on startup for the accept() call. Do you have a code example somewhere else that does what you want, perhaps in a different language? If it's possible, I can implement it, but rn I'm not convinced the interfaces let you do what you want. |
It would be cool if the library supported non blocking receiving for async codes that it wouldn't block the event loop when receiving, like have an option to not block when initializing the library :-)
Thanks!
The text was updated successfully, but these errors were encountered: