librnr/sockset.c
Socket_T *SockSetIterNext(SockSetIter_T *pIter)
{
  int   sd;

  CHKPTR(pIter, NULL);
  CHKPTR(pIter->m_pSockSet, NULL);

  for(sd = pIter->m_sdCur + 1; sd <= pIter->m_pSockSet->m_sdHighest; ++sd)
  {
    if( fdisset_nowarn(sd, &(pIter->m_sdSet)) )
    {
      pIter->m_sdCur = sd;
      return pIter->m_pSockSet->m_pSocket[sd];
    }
  }

  // no more selected sockets found
  pIter->m_sdCur = sd;

  return NULL;
}
/*!
 * \brief Next Socket in iteration over the initialized socket set of SockSet.
 *
 * \param pIter     SockSet interator.
 *
 * \return Pointer to next Socket if found, else NULL.
 */
\brief Next Socket in iteration over the initialized socket set of SockSet.
\param pIter     SockSet interator.

\return Pointer to next Socket if found, else NULL.
\ brief Next Socket in iteration over the initialized socket set of SockSet . \ param pIter SockSet interator . \ return Pointer to next Socket if found else NULL .
Socket_T *SockSetIterNext(SockSetIter_T *pIter)
{
  int   sd;
  CHKPTR(pIter, NULL);
  CHKPTR(pIter->m_pSockSet, NULL);
  for(sd = pIter->m_sdCur + 1; sd <= pIter->m_pSockSet->m_sdHighest; ++sd)
  {
    if( fdisset_nowarn(sd, &(pIter->m_sdSet)) )
    {
      pIter->m_sdCur = sd;
      return pIter->m_pSockSet->m_pSocket[sd];
    }
  }
  pIter->m_sdCur = sd;
  return NULL;
}
Socket_T * SockSetIterNext ( SockSetIter_T * pIter ) { int sd ; CHKPTR ( pIter , NULL ) ; CHKPTR ( pIter -> m_pSockSet , NULL ) ; for ( sd = pIter -> m_sdCur + 1 ; sd <= pIter -> m_pSockSet -> m_sdHighest ; ++ sd ) { if ( fdisset_nowarn ( sd , & ( pIter -> m_sdSet ) ) ) { pIter -> m_sdCur = sd ; return pIter -> m_pSockSet -> m_pSocket [ sd ] ; } } pIter -> m_sdCur = sd ; return NULL ; }
\brief Next Socket in iteration over the initialized socket set of SockSet.
\ brief Next Socket in iteration over the initialized socket set of SockSet .
// no more selected sockets found