librnr/sock.c
bool_t SocketStateIsErrored(Socket_T *pSocket)
{
  int fopts = 0;

  if( (pSocket == NULL) || (pSocket->m_sd == SOCK_SD_CLOSED) )
  {
    return false;
  }
  else if( fcntl(pSocket->m_sd, F_GETFL, &fopts) >= 0 )
  {
    return false;
  }
  else
  {
    return true;
  }
}
/*!
 * \brief Check if Socket is in some kind of errored state.
 *
 * The fcntl() non-blocking function is used to test the socket.
 *
 * \param pSocket   Pointer to Socket.
 *
 * \return Returns true or false.
 */
\brief Check if Socket is in some kind of errored state.
The fcntl() non-blocking function is used to test the socket.

\param pSocket   Pointer to Socket.

\return Returns true or false.
\ brief Check if Socket is in some kind of errored state . The fcntl () non - blocking function is used to test the socket . \ param pSocket Pointer to Socket . \ return Returns true or false .
bool_t SocketStateIsErrored(Socket_T *pSocket)
{
  int fopts = 0;
  if( (pSocket == NULL) || (pSocket->m_sd == SOCK_SD_CLOSED) )
  {
    return false;
  }
  else if( fcntl(pSocket->m_sd, F_GETFL, &fopts) >= 0 )
  {
    return false;
  }
  else
  {
    return true;
  }
}
bool_t SocketStateIsErrored ( Socket_T * pSocket ) { int fopts = 0 ; if ( ( pSocket == NULL ) || ( pSocket -> m_sd == SOCK_SD_CLOSED ) ) { return false ; } else if ( fcntl ( pSocket -> m_sd , F_GETFL , & fopts ) >= 0 ) { return false ; } else { return true ; } }
\brief Check if Socket is in some kind of errored state.
\ brief Check if Socket is in some kind of errored state .