Adafruit_CC3000_Library/Adafruit_CC3000_Server.cpp
// Accept new connections and update the connected clients.
Accept new connections and update the connected clients.
Accept new connections and update the connected clients .
bool Adafruit_CC3000_Server::acceptNewConnections() {
  bool newClientCreated = false;
  for (int i = 0; i < MAX_SERVER_CLIENTS; ++i) {
    if (!_clients[i].connected()) {
      cc3k_int_poll();
      int soc = accept(_listenSocket, NULL, NULL);
      if (soc > -1) {
        _clients[i] = Adafruit_CC3000_Client(soc);
        newClientCreated = true;
      }
    }
  }
  return newClientCreated;
}
bool Adafruit_CC3000_Server :: acceptNewConnections ( ) { bool newClientCreated = false ; for ( int i = 0 ; i < MAX_SERVER_CLIENTS ; ++ i ) { if ( ! _clients [ i ] . connected ( ) ) { cc3k_int_poll ( ) ; int soc = accept ( _listenSocket , NULL , NULL ) ; if ( soc > -1 ) { _clients [ i ] = Adafruit_CC3000_Client ( soc ) ; newClientCreated = true ; } } } return newClientCreated ; }
Accept new connections and update the connected clients.
Accept new connections and update the connected clients .
// For any unconnected client, see if new connections are pending and accept // them as a new client. // Note: Because the non-blocking option was set for the listening // socket this call will not block and instead return SOC_IN_PROGRESS (-2)  // if there are no pending client connections. Also, the address of the  // connected client is not needed, so those parameters are set to NULL. // else either there were no sockets to accept or an error occured.