-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
RFC: udp recvfrom #9418
RFC: udp recvfrom #9418
Conversation
108578b
to
e10dd2b
Compare
This PR would add the following export: A possible alternative would be to have two functions: (edit: re-worded the above comment to make clear what "any suggestions/objections?" is referring to). |
Just a single function, please. -- Juliusz |
I wanted to know if there is any performance difference from the additions to julia> @async begin
s = UDPSocket()
bind(s, ip"0.0.0.0", 10000)
while true
b = recv(s)
end
end On master:
With this PR:
(repeated several times with consistent results) |
So, that being the case, I'll merge in a day or so if there are no objections. (appveyor failure is unrelated) |
Add UDP recvfrom support (packet source addresses)
Changes Unknown when pulling c360a8a on ihnorton:udp_recvfrom into * on JuliaLang:master*. |
Fixes #8901 (also ref #5772). @Keno
I'm open to suggestions on better ways to handle the IP4/6 duality. (another approach would be to store the binding address type in
UDPSocket
and branch based on that)Not really sure what the overhead is for adding these function calls inside the callback. The issue is that the the
addr::Ptr{Void}
argument is only valid for the life of the callback, which necessitates deciding what it is pointing to and copying that out.cc @jech