|
|
|
|
|
by Quarrel
198 days ago
|
|
Thank you. I assumed this was what was happening, but conflating network layer protocols with transport layer ones isn't great. I'm surprised that pedantic zealots, like me in my youth, haven't risen up and flooded rust with issues over it way before this though. |
|
UdpSocket is just able to take ANY file descriptor and try to use it as if it's a UDP socket.
E.g. this compiles, and it's not a bug. It doesn't make any sense, but it's not a bug:
OP is clearly confused, since there's no need to do this at all. socket2::Socket already has a `send_to()`: https://docs.rs/socket2/latest/socket2/struct.Socket.html#me...I think OP either banged on this until it compiled, maybe blindly copying from other examples, or it's vibe coded, and shows why AI needs supervision from someone who can actually understand what the code does.