private function read_data()
{
$buf = $this->readData($this->_socket, $this->_socketReadTimeout);
if (!$buf) {
throw new Exception('oSRS Error - Read buffer is empty. Please make sure IP is whitelisted in RWI. Check the OSRS_KEY and OSRS_USERNAME in the config file as well.');
$data = '';
} else {
$data = $buf;
}
if (!empty($this->osrs_debug)) {
print_r('<pre>' . htmlentities($data) . '</pre>');
}
return $data;
}