net: split resolve out of connect #10663

pull theuni wants to merge 3 commits into bitcoin:master from theuni:split-resolve-connect changing 3 files +46 −68
  1. theuni commented at 12:45 AM on June 24, 2017: member

    This is a greatly simplified version of #10285, which only aims to address async resolving.

    It essentially breaks up two wrapper functions for things only used in one place (ConnectSocketDirectly/ConnectThroughProxy) in favor of calling them directly. This allows us to fully handle resolves before attempting a connection, as is necessary for async connections.

    As a bonus, I believe the logic is now much easier to follow than before.

  2. fanquake added the label P2P on Jun 24, 2017
  3. fanquake added the label Refactoring on Jun 24, 2017
  4. TheBlueMatt commented at 10:16 PM on June 24, 2017: member

    utACK 13015a6bea5bc9e82c8fa207f2c9d6489aff6589. Still want to see something happen on the RAII-ifying SOCKET wrapper, but this shouldnt have any effect.

  5. laanwj commented at 10:08 AM on August 23, 2017: member

    Need rebase.

  6. theuni force-pushed on Sep 13, 2017
  7. theuni commented at 2:37 AM on September 13, 2017: member

    Rebased.

    Unfortunately, this as well as a follow-up will be needed before #11227, in order to avoid an unlikely race at shutdown (events must be added from the event-handler thread, otherwise they may be added at the same time that the handler is being torn down). That's a step in the right direction anyway though, as it's needed for async connections themselves.

    I'm working on the follow-up now.

  8. laanwj added this to the "Blockers" column in a project

  9. net: separate resolving and conecting
    ConnectSocketByName handled resolves as necessary, obscuring the connection
    process. With them separated, each can be handled asynchronously.
    
    Also, since proxies must be considered now anyway, go ahead and eliminate the
    ConnectSocket wrapper and use ConnectSocketDirectly... directly.
    2416dd7cc9
  10. net: remove now-superfluous numeric resolve
    This was added in order to help OpenNetworkConnection avoid creating a
    connection that it would end up aborting. It was necessary because resolving
    was done as part of the connection process.
    
    Now that resolving is separated from connecting, this case is detected before
    the connection is attempted.
    45fd75453e
  11. net: remove now-unused functions b887676e1b
  12. theuni force-pushed on Sep 19, 2017
  13. theuni force-pushed on Sep 19, 2017
  14. laanwj commented at 3:05 PM on September 28, 2017: member

    utACK b887676

  15. laanwj merged this on Sep 28, 2017
  16. laanwj closed this on Sep 28, 2017

  17. laanwj referenced this in commit 9d31ed2e69 on Sep 28, 2017
  18. laanwj removed this from the "Blockers" column in a project

  19. PastaPastaPasta referenced this in commit 3a6067ada0 on Dec 22, 2019
  20. PastaPastaPasta referenced this in commit c637771b9d on Jan 2, 2020
  21. PastaPastaPasta referenced this in commit efa150fb3e on Jan 4, 2020
  22. PastaPastaPasta referenced this in commit 58c58e1f12 on Jan 12, 2020
  23. PastaPastaPasta referenced this in commit d17fbc84ba on Jan 12, 2020
  24. PastaPastaPasta referenced this in commit 25e686e7f1 on Jan 12, 2020
  25. PastaPastaPasta referenced this in commit 09ca733913 on Jan 12, 2020
  26. PastaPastaPasta referenced this in commit f411c5cd94 on Jan 12, 2020
  27. PastaPastaPasta referenced this in commit 19180b3357 on Jan 12, 2020
  28. ckti referenced this in commit edf5d1faf0 on Mar 28, 2021
  29. gades referenced this in commit a6d5b1a704 on Jun 25, 2021
  30. DrahtBot 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-18 15:15 UTC

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