|Skip Navigation Links|
|Exit Print View|
|Oracle Solaris Cluster Reference Manual Oracle Solaris Cluster 4.0|
- establish a TCP connection to an application
cc [flags…] -I /usr/cluster/include file -L /usr/cluster/lib -l dsdev #include <rgm/libdsdev.h> scha_err_t scds_fm_tcp_connect(scds_handle_t handle, int *sock, const char*hostname, int port, time_t timeout);
The scds_fm_tcp_connect() function establishes a TCP connection with a process being monitored.
Consider using scds_fm_net_connect(3HA) instead of this function.
The following parameters are supported:
The handle returned by scds_initialize(3HA).
A handle to the socket established by this function. This parameter is an output argument set by this function.
Name of the host where the process is listening. If the hostname maps to an IPv4 address only, or to both IPv4 and IPv6 addresses, this function uses the IPv4 mapping as the address at which to connect. If the hostname maps to an IPv6 address only, this function uses that IPv6 mapping as the address at which to connect.
TCP port number.
Timeout value in seconds.
The scds_fm_tcp_connect() function returns the following:
The function succeeded.
The function failed.
Indicates that the function succeeded.
Indicates that an attempt to initiate a connection on a socket failed for reasons other than a timeout.
Indicates that the function timed out.
Indicate the function failed. See scha_calls(3HA) for the meaning of failure codes.
See attributes(5) for descriptions of the following attributes: