function Net_Socket::readWord in Flickr API 5
Reads a word of data
@access public
Return value
1 word of data from the socket, or a PEAR_Error if not connected.
File
- phpFlickr/
PEAR/ Net/ Socket.php, line 362
Class
- Net_Socket
- Generalized Socket class.
Code
function readWord() {
if (!is_resource($this->fp)) {
return $this
->raiseError('not connected');
}
$buf = @fread($this->fp, 2);
return ord($buf[0]) + (ord($buf[1]) << 8);
}