int available( )

Returns the number of received and non-read bytes in the socket that can be read.

Source

/**
 * Returns the number of received and non-read bytes in the socket that
 * can be read.
 */
int available();