sdk/modules/lte/altcom/api/socket/altcom_select.c
/****************************************************************************
 * Name: altcom_select_request_asyncsend
 *
 * Description:
 *   Send select request.
 *
 * Input parameters:
 *   maxfdp1 - the maximum socket file descriptor number (+1) of any
 *             descriptor in any of the three sets.
 *   readset - the set of descriptions to monitor for read-ready events
 *   writeset - the set of descriptions to monitor for write-ready events
 *   exceptset - the set of descriptions to monitor for error events
 *
 *  Return:
 *  >0: The select id use select cancel request
 *  -1: An error occurred (errno will be set appropriately)
 *
 ****************************************************************************/
altcom_select_request_asyncsend
Description:
Send select request.

Input parameters:
maxfdp1 - the maximum socket file descriptor number (+1) of any
descriptor in any of the three sets.

>0: The select id use select cancel request
-1: An error occurred (errno will be set appropriately)
altcom_select_request_asyncsend Description : Send select request . Input parameters : maxfdp1 - the maximum socket file descriptor number ( + 1 ) of any descriptor in any of the three sets . > 0 : The select id use select cancel request - 1 : An error occurred ( errno will be set appropriately )
int altcom_select_request_asyncsend(int maxfdp1, altcom_fd_set *readset,
                                    altcom_fd_set *writeset,
                                    altcom_fd_set *exceptset)
{
  int32_t             result;
  struct select_req_s req;
  if (!altcom_isinit())
    {
      DBGIF_LOG_ERROR("Not intialized\n");
      altcom_seterrno(ALTCOM_ENETDOWN);
      return -1;
    }
  req.select_id = SELECT_ID_GEN_AUTO;
  req.maxfdp1   = maxfdp1;
  req.request   = APICMD_SELECT_REQUEST_BLOCK;
  req.readset   = readset;
  req.writeset  = writeset;
  req.exceptset = exceptset;
  req.timeout   = SYS_TIMEO_FEVR; 
  result = select_request_async(&req);
  if (result == SELECT_REQ_FAILURE)
    {
      return -1;
    }
  return result;
}
int altcom_select_request_asyncsend ( int maxfdp1 , altcom_fd_set * readset , altcom_fd_set * writeset , altcom_fd_set * exceptset ) { int32_t result ; struct select_req_s req ; if ( ! altcom_isinit ( ) ) { DBGIF_LOG_ERROR ( " \n " ) ; altcom_seterrno ( ALTCOM_ENETDOWN ) ; return -1 ; } req . select_id = SELECT_ID_GEN_AUTO ; req . maxfdp1 = maxfdp1 ; req . request = APICMD_SELECT_REQUEST_BLOCK ; req . readset = readset ; req . writeset = writeset ; req . exceptset = exceptset ; req . timeout = SYS_TIMEO_FEVR ; result = select_request_async ( & req ) ; if ( result == SELECT_REQ_FAILURE ) { return -1 ; } return result ; }
Name: altcom_select_request_asyncsend
 Description:
   Send select request.
Name : altcom_select_request_asyncsend Description : Send select request .
/* ignore when do select_request_async */