You are here

function Net_Socket::readByte in Flickr API 5

Reads a byte of data

@access public

Return value

1 byte of data from the socket, or a PEAR_Error if not connected.

File

phpFlickr/PEAR/Net/Socket.php, line 346

Class

Net_Socket
Generalized Socket class.

Code

function readByte() {
  if (!is_resource($this->fp)) {
    return $this
      ->raiseError('not connected');
  }
  return ord(@fread($this->fp, 1));
}