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.
fanquake added the label P2P on Jun 24, 2017
fanquake added the label Refactoring on Jun 24, 2017
TheBlueMatt
commented at 10:16 PM on June 24, 2017:
contributor
utACK13015a6bea5bc9e82c8fa207f2c9d6489aff6589. Still want to see something happen on the RAII-ifying SOCKET wrapper, but this shouldnt have any effect.
laanwj
commented at 10:08 AM on August 23, 2017:
member
Need rebase.
theuni force-pushed on Sep 13, 2017
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.
laanwj added this to the "Blockers" column in a project
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
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.
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-05-20 06:55 UTC