Make the SOCKS code more consistent, and document the constants used.
net: Improve and document SOCKS code #11397
pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2017_09_socks_refactor changing 1 files +89 −36-
laanwj commented at 9:59 AM on September 25, 2017: member
- laanwj added the label P2P on Sep 25, 2017
- laanwj added the label Refactoring on Sep 25, 2017
- laanwj force-pushed on Sep 25, 2017
-
in src/netbase.cpp:256 in 0f92fb279e outdated
253 | // Maximum time to wait in one select call. It will take up until this time (in millis) 254 | // to break off in case of an interruption. 255 | const int64_t maxWait = 1000; 256 | while (len > 0 && curTime < endTime) { 257 | - ssize_t ret = recv(hSocket, data, len, 0); // Optimistically try the recv first 258 | + ssize_t ret = recv(hSocket, (void*)data, len, 0); // Optimistically try the recv first
promag commented at 3:01 PM on September 25, 2017:Funny, in windows 2nd arg is
char*, that's why the build failed.
laanwj commented at 3:17 PM on September 25, 2017:Oops, thought it would be void, added the wrong cast. Should be ok now.
laanwj force-pushed on Sep 25, 2017theuni commented at 4:42 PM on September 25, 2017: memberutACK 46544c60d67d8a7095e7243795d2b570ab8391e3. InterruptibleRecv goes away soon as part of the async connection work, but having the SOCKS constants defined will make those changes much easier to review. Thanks for saving me a step :)
promag commented at 4:52 PM on September 25, 2017: memberutACK 46544c6.
in src/netbase.cpp:217 in 46544c60d6 outdated
212 | + NOTALLOWED = 0x02, //! Connection not allowed by ruleset 213 | + NETUNREACHABLE = 0x03, //! Network unreachable 214 | + HOSTUNREACHABLE = 0x04, //! Network unreachable 215 | + CONNREFUSED = 0x05, //! Connection refused 216 | + TTLEXPIRED = 0x06, //! TTL expired 217 | + CMDUNSUPPORTED = 0x07, //! Command not supported
promag commented at 4:54 PM on September 25, 2017:Nit, align this and above comments with below.
gmaxwell approvedgmaxwell commented at 7:36 PM on September 25, 2017: contributorACK
22f816ef4dnet: Improve and document SOCKS code
Make the SOCKS code more consistent, and document the constants used.
laanwj force-pushed on Sep 26, 2017gmaxwell approvedgmaxwell commented at 6:28 PM on September 27, 2017: contributorreACK
sipa commented at 6:34 PM on September 27, 2017: memberutACK 22f816ef4dd57785627d801c247714cace7fc5b5
TheBlueMatt commented at 7:16 PM on September 27, 2017: memberutACK 22f816ef4dd57785627d801c247714cace7fc5b5
jonasschnelli commented at 3:03 AM on September 28, 2017: contributorutACK 22f816ef4dd57785627d801c247714cace7fc5b5
jonasschnelli commented at 3:09 AM on September 28, 2017: contributorTested ACK (macOS 10.12) 22f816ef4dd57785627d801c247714cace7fc5b5.
jonasschnelli merged this on Sep 28, 2017jonasschnelli closed this on Sep 28, 2017jonasschnelli referenced this in commit d90a00eabe on Sep 28, 2017MarcoFalke referenced this in commit 27e861a9b3 on Oct 9, 2017codablock referenced this in commit 1313ee3d46 on Sep 25, 2019ebfull referenced this in commit c3b53fa2e8 on Nov 8, 2019ebfull referenced this in commit 812d0ac44b on Nov 8, 2019cronicc referenced this in commit ce5818b8c1 on Nov 8, 2019milesmanley referenced this in commit a437b46e69 on Nov 8, 2019ca333 referenced this in commit b429cee302 on Nov 9, 2019denverbdr referenced this in commit 5f5544dfd1 on Nov 9, 2019codablock referenced this in commit 9e7908063e on Nov 18, 2019codablock referenced this in commit 36473015b6 on Nov 19, 2019milesmanley referenced this in commit 196ad00412 on Nov 23, 2019MIPPL referenced this in commit 25d33a412b on Nov 24, 2019Asherda referenced this in commit 6f66f879dd on Nov 30, 2019Asherda referenced this in commit a5c1645c6b on Nov 30, 2019CryptoForge referenced this in commit 79779934a1 on Dec 3, 2019cryptobubbles referenced this in commit 327e39f99e on Dec 6, 2019cryptobubbles referenced this in commit aad398c0d3 on Dec 7, 2019hTrap referenced this in commit 37d19dbb52 on Dec 8, 2019cryptobubbles referenced this in commit 82448c8534 on Dec 8, 2019cryptoprofutonium referenced this in commit 15975c0904 on Dec 8, 2019cryptoprofutonium referenced this in commit 3bf607c4f4 on Dec 8, 2019cryptobubbles referenced this in commit f42d6f10be on Dec 8, 2019hTrap referenced this in commit 017aa16bf5 on Dec 8, 2019barrystyle referenced this in commit 3ea5edc704 on Jan 22, 2020cronicc referenced this in commit a9f78af0b0 on Feb 10, 2020random-zebra referenced this in commit 3c6076835a on Feb 1, 2021ckti referenced this in commit d99447fcea on Mar 28, 2021DrahtBot locked this on Sep 8, 2021Labels
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-13 15:15 UTC
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-13 15:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me