You are here

function Net_Socket::disconnect in Flickr API 5

Disconnects from the peer, closes the socket.

@access public

Return value

mixed true on success or an error object otherwise

File

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

Class

Net_Socket
Generalized Socket class.

Code

function disconnect() {
  if (!is_resource($this->fp)) {
    return $this
      ->raiseError('not connected');
  }
  @fclose($this->fp);
  $this->fp = null;
  return true;
}