-
Notifications
You must be signed in to change notification settings - Fork 283
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
Minimize Send and Receive Socket Timeout Delays #206
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merge pull request nasa#205 from NPrincen/develop
sendUDP and readUDP were using longer than necessary socket timeouts that may add to process time delay and stuttering. They were also using different values between Window and Linux/Mac. The timeouts are now standardized for all versions.
SendTo and Read were using longer than necessary socket timeouts that may add to process time delay and stuttering. They were also using different values between Window and Linux/Mac. The timeouts are now standardized for all versions and coded in the same manner as the xplaneConnect.c functions.
SendTo and Read were using longer than necessary socket timeouts that may add to process time delay and stuttering. They were also using different values between Window and Linux/Mac. The timeouts are now standardized for all versions and coded in the same manner as the xplaneConnect.c functions.
SendTo and Read were using longer than necessary socket timeouts that may add to process time delay and stuttering. They were also using different values between Window and Linux/Mac. The timeouts are now standardized for all versions and coded in the same manner as the xplaneConnect.c functions.
sendUDP and readUDP were using longer than necessary socket timeouts that may add to process time delay and stuttering. They were also using different values between Window and Linux/Mac. The timeouts are now standardized for all versions.
SendTo and Read were using longer than necessary socket timeouts that may add to process time delay and stuttering. They were also using different values between Window and Linux/Mac. The timeouts are now standardized for all versions and coded in the same manner as the xplaneConnect.c functions.
jason-watkins
approved these changes
May 16, 2020
NPrincen
added a commit
to NPrincen/XPlaneConnect
that referenced
this pull request
May 16, 2020
Merge pull request nasa#206 from NPrincen/develop
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the xplaneConnect.c sendUDP and readUDP functions, longer than necessary socket timeouts were being used. They were also different for Windows and Linux/Mac. These socket timeouts contribute to process time delay and potential stuttering. The timeouts are now minimized based on testing with the Example and Test programs. They are also standardized for all operating systems.
Line 209 of xplaneConnect.c has a TO DO comment for a potential future upgrade. If the xplaneConnect.c functions had message handlers like the plugin, then the socket timeout of the readUDP function could be set to 0 to make the read polling. The process would not need to wait around for a read to complete. It could move on to other tasks and read and process the UDP messages as they arrive.
In the plugin UDPSocket.cpp code, SendTo and Read were using longer than necessary socket timeouts with the same potential result as for xplaneConnect. They were also using different values between Window and Linux/Mac. The timeouts are now standardized for all operating systems and coded in the same manner as the xplaneConnect.c functions. Note that here, the Read select timeout is set to 0 in order to make the Read polling. We can do this here because of the message handling that is done in the plugin.