-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HPCC-31474 Refactor socket readtms/writtms code to handle nonblocking
Cleanup and refactor the jsocket and securesocket readtms/writetms and derivatives to cope with nonblocking sockets. Symantically they remain the same. e.g. readtms will not return until it has written at least min_size. Duplicate/very similar code in dedupped/consolidated into readtms and writetms 1) in non-blocking mode, readtms would fire an exception if socket not ready (EWOULDBLOCK, EAGAIN). 2) jsocket writetms would temporarily place a non-blocking socket into nonblocking mode. Now writetms takes a minSize (akin to readtms minSize). It will return if at least this much is written (but normal usage is with min=max). NB: previous writetms in both implementations were not called anywhere. 3) in non-blocking mode securesocket readtms and writetms would previously fail if blocked Signed-off-by: Jake Smith <[email protected]>
- Loading branch information
Showing
8 changed files
with
443 additions
and
649 deletions.
There are no files selected for viewing
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Oops, something went wrong.