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
Problem with UDP broadcast sockets #11
Comments
Changed implementation. Now always call recvfrom() rather than recv(), no longer conditional. |
I think there are 2 minor comments: Solution: Separate stream from datagram. |
I agree with your comments. Eric wanted to use recvfrom everywhere if we used it at all, and not have the conditional (which I originally had). But since the debug info could be confusing for TCP sockets I have re-implemented the conditional as you suggested. I also changed flushIt back to recv(). I have committed the changes. |
Fixed in R4-28. |
There is a problem with UDP broadcast sockets created with drvAsynIPPortConfigure using the IP protocol string UDP*. Broadcast messages written to that socket work correctly. However, replies from clients to such broadcasts are rejected by the server that sent the broadcast. The problem is that the drvAsynIPPort calls connect(), send(), and recv() on such sockets. This is incorrect, it should not call connect(), and it should call sendto() and recvfrom() rather than send() and recv().
Pull request #10 fixes this problem by doing the following for all UDP ports, not just ports configured for broadcasts:
The text was updated successfully, but these errors were encountered: