Implementation was re-worked. Now for _tcp_do_connect_ function if _from_ parameter is null then the sending socket is bound on the first listening address/port, which matches the required address family (IPv4/IPv6). The same approach is implemented for UDP sockets when 'mhomed=1'.