Patched SOCKET and made socket READF, READU and CLOSE working, at last!#2185
Open
GillesDuvert wants to merge 3 commits intognudatalanguage:masterfrom
Open
Patched SOCKET and made socket READF, READU and CLOSE working, at last!#2185GillesDuvert wants to merge 3 commits intognudatalanguage:masterfrom
GillesDuvert wants to merge 3 commits intognudatalanguage:masterfrom
Conversation
added 2 commits
March 27, 2026 10:18
following gnudatalanguage#2178, changed obsoleted gethostbyname() to getaddrinfo(). Testing this, I realized that neither READF or READU on sockets were working correctly (i.e. as IDL does) or even working at all. This since the beginnings of GDL. Because the buffering used, necessary because GDL has opted to a generalized C++ interface for I/O using std::streams, was not completely consistent in every case, especially when disguising a socket as a bona fide std::stringstream. For example, sockets were NOT CLOSED by the CLOSE command. Socket reads were buffering the data without knowing the amount of data to be read, allowing for timeouts or missing some data. Hopefully this is now beyond us.
…- as I've no inclination to solve this
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2185 +/- ##
==========================================
- Coverage 41.97% 41.97% -0.01%
==========================================
Files 457 457
Lines 115326 115341 +15
Branches 22743 22750 +7
==========================================
- Hits 48412 48411 -1
- Misses 66914 66930 +16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ation of streams that are not tailored for handling socket data.
This file contains hidden or 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
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.
following #2178, changed obsoleted gethostbyname() to getaddrinfo(). Testing this, I realized that neither READF or READU on sockets were working correctly (i.e. as IDL does) or even working at all. This since the beginnings of GDL.
Because the buffering used, necessary because GDL has opted to a generalized C++ interface for I/O using std::streams, was not completely consistent in every case, especially when disguising a socket as a bona fide std::stringstream. For example, sockets were NOT CLOSED by the CLOSE command. Socket reads were buffering the data without knowing the amount of data to be read, allowing for timeouts or missing some data. Hopefully this is now beyond us.