Adafruit_CC3000_Library/Adafruit_CC3000_Server.cpp
// Return index of a client with data available for reading. Can be turned
// into a client instance with getClientRef().  Accepts an optional parameter
// to return a boolean (by reference) indicating if available client is connecting
// for the first time.
Return index of a client with data available for reading. Can be turned
into a client instance with getClientRef().  Accepts an optional parameter
to return a boolean (by reference) indicating if available client is connecting
for the first time.
Return index of a client with data available for reading . Can be turned into a client instance with getClientRef () . Accepts an optional parameter to return a boolean ( by reference ) indicating if available client is connecting for the first time .
int8_t Adafruit_CC3000_Server::availableIndex(bool *newClient) {
  bool newClientCreated = acceptNewConnections();
  if (newClient)
    *newClient = newClientCreated;
  for (int i = 0; i < MAX_SERVER_CLIENTS; ++i) {
    if (_clients[i].connected() && _clients[i].available() > 0) {
      return i;
    }
  }
  return -1;
}
int8_t Adafruit_CC3000_Server :: availableIndex ( bool * newClient ) { bool newClientCreated = acceptNewConnections ( ) ; if ( newClient ) * newClient = newClientCreated ; for ( int i = 0 ; i < MAX_SERVER_CLIENTS ; ++ i ) { if ( _clients [ i ] . connected ( ) && _clients [ i ] . available ( ) > 0 ) { return i ; } } return -1 ; }
Return index of a client with data available for reading.
Return index of a client with data available for reading .
// Find the first client which is ready to read and return it.