From ecf278c4672aa680803ee82e1a59a686c765f226 Mon Sep 17 00:00:00 2001 From: Ruslan Mustakov Date: Tue, 2 May 2017 14:25:50 +0700 Subject: Implement dial, support IPv6 in httpclient (#5763) * Implement dial, support IPv6 in httpclient Added ``dial`` procedure to networking modules: ``net``, ``asyncdispatch``, ``asyncnet``. It merges socket creation, address resolution, and connection into single step. When using ``dial``, you don't have to worry about IPv4 vs IPv6 problem. Fixed addrInfo loop in connect to behave properly. Previously it would stop on first non-immediate failure, instead of continuing and trying the remaining addresses. Fixed newAsyncNativeSocket to raise proper error if socket creation fails. Fixes: #3811 * Check domain during connect() only on non-Windows This is how it was in the previous implementation of connect(). * Call 'osLastError' before 'close' in net.dial * Record osLastError before freeAddrInfo in net.dial * Add missing docs for 'dial' proc * Optimize dial to create one FD per domain, add tests And make async IPv6 servers work on Windows. * Add IPv6 test to uri module * Fix getAddrString error handling --- web/news/e031_version_0_16_2.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'web') diff --git a/web/news/e031_version_0_16_2.rst b/web/news/e031_version_0_16_2.rst index b38f0c159..63884700f 100644 --- a/web/news/e031_version_0_16_2.rst +++ b/web/news/e031_version_0_16_2.rst @@ -66,7 +66,10 @@ Library Additions ----------------- - Added ``system.onThreadDestruction``. - +- Added ``dial`` procedure to networking modules: ``net``, ``asyncdispatch``, + ``asyncnet``. It merges socket creation, address resolution, and connection + into single step. When using ``dial``, you don't have to worry about + IPv4 vs IPv6 problem. ``httpclient`` now supports IPv6. Tool Additions -------------- -- cgit 1.4.1-2-gfad0