-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 does not bind on send only port. Fixes: #3127 #3143
base: devel
Are you sure you want to change the base?
Conversation
@zimri-leisher want to take a look? |
Awesome, thanks for figuring out the issue! |
@zimri-leisher I think this is now done. Here is a summary of the decisions and changes I made:
Let me know if you like these changes, 2 and 3 will require some users to update code. |
@zimri-leisher this work should be ready. Would you mind reading the summary and let me know any more comments? @thomas-bc would you do the official review? |
Sorry for the late response. 1 and 2 are great! 3 is interesting, it makes sense to me, but generally when things like this happen (a class has a method that should not ever be called), it's pointing towards a larger issue with the class hierarchy. I think this is a fine fix for now, but maybe in the future the socket class hierarchy could be simplified into a more linear, C-style layout (depth-one or -zero inheritance, and helper libraries of static functions). I think most of the problems we're facing, and code that's confusing, is just us fighting abstraction that could be removed altogether. I will keep this in mind for future contributions to FPrime. Finally, I agree with 4. |
Change Description
Removes the attempt to bind on UDP ports where only
send
was configured.I also fixed the reconnect handling now that
send
can also attempt to reconnect.UTs to check the following would be nice:
setAutoConnect
methodRationale
UDP may send, receive, or both depending. When a send only UDP calls
bind
it fails because the receive port is invalid.Fixed: #3127 #3133.
Testing/Review Recommendations
Tested with UDP in the downlink chain of Ref (only downlink) works as expected with the following caveat:
configureSend
must be called before starting threads.Future Work
Decided to do the future work!