You are here

function Net_Socket::setTimeout in Flickr API 5

Sets the timeout value on socket descriptor, expressed in the sum of seconds and microseconds

@access public

Parameters

integer $seconds Seconds.:

integer $microseconds Microseconds.:

Return value

mixed true on success or an error object otherwise

File

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

Class

Net_Socket
Generalized Socket class.

Code

function setTimeout($seconds, $microseconds) {
  if (!is_resource($this->fp)) {
    return $this
      ->raiseError('not connected');
  }
  return socket_set_timeout($this->fp, $seconds, $microseconds);
}