is a callable returning a protocol instance
if empty then the $(D_PSYMBOL socket) parameter should be specified.
service name or port number.
if not $(D_KEYWORD null), a SSL/TLS transport is created (by default a plain TCP transport is created).
is only for use together with ssl, and sets or overrides the hostname that the target server’s certificate will be matched against. By default the value of the host argument is used. If host is empty, there is no default and you must pass a value for $(D_PSYMBOL serverHostname). If $(D_PSYMBOL serverHostname) is empty, hostname matching is disabled (which is a serious security risk, allowing for man-in-the-middle-attacks).
optional adress family.
optional protocol.
optional flags.
if not $(D_KEYWORD null), should be an existing, already connected $(D_PSYMBOL Socket) object to be used by the transport. If $(D_PSYMBOL socket) is given, none of $(D_PSYMBOL host), $(D_PSYMBOL service), $(D_PSYMBOL addressFamily), $(D_PSYMBOL protocolType), $(D_PSYMBOL addressInfoFlags) and $(D_PSYMBOL localAddress) should be specified.
if given, together with $(D_PSYMBOL localService) is used to bind the socket locally. The $(D_PSYMBOL localHost) and $(D_PSYMBOL localService) are looked up using $(D_PSYMBOL getAddressInfo()), similarly to host and service.
see $(D_PSYMBOL localHost).
Tuple!(Transport, "transport", Protocol, "protocol")
Create a streaming transport connection to a given Internet host and port: socket family $(D_PSYMBOL AddressFamily.INET) or $(D_PSYMBOL AddressFamily.INET6) depending on host (or family if specified), socket type $(D_PSYMBOL SocketType.STREAM).
This method is a coroutine which will try to establish the connection in the background. When successful, the coroutine returns a (transport, protocol) tuple.
The chronological synopsis of the underlying operation is as follows:
The connection is established, and a transport is created to represent it. $(D_PSYMBOL protocolFactory) is called without arguments and must return a protocol instance. The protocol instance is tied to the transport, and its $(D_PSYMBOL connectionMade()) method is called. The coroutine returns successfully with the $(D_PSYMBOL (transport, protocol)) tuple.
The created transport is an implementation-dependent bidirectional stream.
Options allowing to change how the connection is created: