Create a socket and try to connect to the specified service.

Synopsis

Declared in <netbase.h>

std::unique_ptr<Sock>
ConnectDirectly(
    CService const& dest,
    bool manual_connection);

Return Value

the connected socket if the operation succeeded, empty unique_ptr otherwise

Parameters

Name

Description

dest [in]

The service to which to connect.

manual_connection [in]

Whether or not the connection was manually requested (e.g. through the addnode RPC)

Created with MrDocs