VORTEX_SOCKET vortex_connection_sock_connect_common ( VortexCtx ctx,
const char *  host,
const char *  port,
int *  timeout,
VortexNetTransport  transport,
axlError **  error 

Allows to create a plain socket connection against the host and port provided allowing to configure the transport.

This function differs from vortex_connection_sock_connect in the sense it allows to configure the transport (VortexNetTransport) so you can create TCP/IPv4 (VORTEX_IPv4) and TCP/IPv6 (VORTEX_IPv6) connections.

ctxThe context where the connection happens.
hostThe host server to connect to.
portThe port server to connect to.
timeoutParameter where optionally is returned the timeout defined by the library (vortex_connection_get_connect_timeout) that remains after only doing a socket connected. The value is only returned if the caller provide a reference.
transportThe network transport to use for this connect operation.
errorOptional axlError reference to report an error code and a textual diagnostic.
A connected socket or -1 if it fails. The particular error is reported at axlError optional reference.

References vortex_connection_get_connect_timeout(), vortex_connection_set_sock_block(), vortex_connection_set_sock_tcp_nodelay(), VORTEX_IPv4, VORTEX_IPv6, VortexConnectionError, VortexNameResolvFailure, VortexSocketSanityError, and WRITE_OPERATIONS.

Referenced by vortex_connection_sock_connect().