-
Notifications
You must be signed in to change notification settings - Fork 717
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
send_to doesn't work on the Windows #411
Comments
@Covertness do you have a larger code sample that we could test out and run? It looks like errors may be ignored here which may be indicative of a problem? |
@alexcrichton Yeah. I met this issue when I test the coap-rs. The project is A Constrained Application Protocol(CoAP) library. You can run examples or test cases to reproduce this issue. |
@Covertness ah my point was that on this line the result is ignored, so it could perhaps be sending "would block" which is why it's not transmitting. This may work on Unix for now due to slightly different semantics, and if that error is handled it may work correctly on Windows. |
@alexcrichton The result was |
@Covertness |
@alexchrichton are we misusing the UDP socket in some way here? From a high level, we have two threads that have access to the Is the Ok(None) an indicator of an issue with how we use the library, or is it some kind of other issue? |
@jamesmunns I haven't scrutinized the code in too much detail, but |
@jamesmunns It seems that we can send the response only when a readable event happen. I will have a try. |
@Covertness You could just give the TX thread a handle to the write side of the channel, which will just put it back in the queue to be consumed later. |
It sounds like this was a local problem, so I'm going to close, but I'd be willing to help out if there are still problems! |
I find
UdpSocket::send_to
returnOk(None)
on the Windows, but the client don't receive any response. The code:The text was updated successfully, but these errors were encountered: