support ipv6 for outgoing NTCP connections

This commit is contained in:
orignal 2014-10-26 21:32:06 -04:00
parent 1408422da9
commit 7fb7341502
6 changed files with 55 additions and 6 deletions

View file

@ -253,7 +253,7 @@ namespace transport
{
// existing session not found. create new
// try NTCP first if message size < 16K
auto address = r->GetNTCPAddress ();
auto address = r->GetNTCPAddress (!context.SupportsV6 ());
if (address && !r->UsesIntroducer () && !r->IsUnreachable () && msg->GetLength () < NTCP_MAX_MESSAGE_SIZE)
{
auto s = new NTCPClient (m_Service, address->host, address->port, *r);