yw_conn_get_state

Name

yw_conn_get_state -- extensivly check state of connection

Synopsis


     #include <yw/sock.h>
   

int yw_conn_get_state(YwConnection *conn, const char **file, int *line, int *state);

DESCRIPTION

This function is used to check current state of connection. Connection state is stored at *state, line and file of library, where the error was set, are stored at *file and *line. Any of these three is not stored if pointer is NULL.

yw_strerror(3) function can be used to translate returned value into human-readable string. yw_conn_state(3) may be more handy in regular situation, when you don't want to debug the library. yw_conn_state(conn) is equivalent to yw_conn_get_state(conn, NULL, NULL, NULL).

RETURN VALUE

The yw_conn_get_state() function returns one of YW_ERR_* values. They are defined in <yw/error.h>. YW_ERR_OK is 0. (note: the value is both returned and stored at *state).

INFO

Generated from: sysconn.c,v 1.11 2001/05/11 10:38:05 malekith Exp.