-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
UDP send after connect not possible #262
Labels
Comments
Sounds reasonable. We're working on a |
Hello! Would you accept a pull request to add a variant without the address, or should I fork it, or is v3 coming soon? |
Do you mean a variant as in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Once a UDP socket is connected in libuv, you have to call send with a null address or else you get
UV_EISCONN
and nothing is sent. There seems to be no way to do this through the uvw API, since theaddr
parameter is passed by reference. In udp.cc the wrappers are like:Empirically it works to call it like
But this is undefined behavior in C++, and the compiler (at least Clang++-10) warns accordingly.
I think the right answer is to have versions of
UDPHandle::send
that don't take an address parameter.References:
http://docs.libuv.org/en/v1.x/udp.html in the uv_udp_send section
The text was updated successfully, but these errors were encountered: