net: add setSocketBlocking() as OS independent wrapper #4491

pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:net_cleanup_blocking changing 3 files +47 −44
  1. Diapolo commented at 9:01 AM on July 9, 2014: none

    No description provided.

  2. laanwj commented at 9:58 AM on July 9, 2014: member

    ACK code changes, haven't tested

  3. net: add SetSocketNonBlocking() as OS independent wrapper eaedb59e05
  4. in src/netbase.h:None in da17aaff36 outdated
     177 | @@ -178,5 +178,7 @@ bool ConnectSocket(const CService &addr, SOCKET& hSocketRet, int nTimeout = nCon
     178 |  bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault = 0, int nTimeout = nConnectTimeout);
     179 |  /** Return readable error string for a network error code */
     180 |  std::string NetworkErrorString(int err);
     181 | +/** Disable or enable blocking-mode for a socket */
     182 | +bool setSocketBlocking(SOCKET& hSocket, bool fBlocking);
    


    laanwj commented at 6:30 AM on July 10, 2014:

    You forgot to capitalize the initial letter here. BTW historically it has always been "set non-blocking mode" on a socket, not "set blocking mode" in network APIs. It may be better to keep to that convention. So to make it SetSocketNonBlocking.


    sipa commented at 1:23 PM on July 10, 2014:

    +1


    Diapolo commented at 5:52 AM on July 16, 2014:

    I'm going to update this.


    Diapolo commented at 8:13 PM on July 17, 2014:

    Changes made...

  5. Diapolo commented at 8:13 PM on July 17, 2014: none

    If @BitcoinPullTester is happy this is ready to merge? @laanwj @sipa

  6. BitcoinPullTester commented at 8:48 PM on July 17, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4491_eaedb59e0570558a528eac52f7fd89639911496e/ for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  7. laanwj commented at 9:40 AM on July 18, 2014: member

    Untested ACK (going to merge this on my test node)

  8. Diapolo commented at 10:22 AM on July 21, 2014: none

    @sipa Can you also re-check and ACK eventually?

  9. Diapolo commented at 11:35 AM on July 25, 2014: none

    @sipa @laanwj Any progress here?

  10. laanwj merged this on Jul 28, 2014
  11. laanwj closed this on Jul 28, 2014

  12. laanwj referenced this in commit c5eabde9ea on Jul 28, 2014
  13. Diapolo deleted the branch on Jul 28, 2014
  14. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me