MYQTT_SOCKET myqtt_conn_sock_connect ( MyQttCtx ctx,
const char *  host,
const char *  port,
int *  timeout,
axlError **  error 
)

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

Parameters
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 (myqtt_conn_get_connect_timeout) that remains after only doing a socket connected. The value is only returned if the caller provide a reference.
errorOptional axlError reference to report an error code and a textual diagnostic.
Returns
A connected socket or -1 if it fails. The particular error is reported at axlError optional reference.

References myqtt_conn_sock_connect_common(), and MYQTT_IPv4.

Referenced by myqttd_support_smtp_send().