\Zend_Http_Client_Adapter_Socket
A sockets based (stream_socket_client) adapter class for Zend_Http_Client. Can be used on almost every PHP environment, and does not require any special extensions.
- Copyright: Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
- License: http://framework.zend.com/license/new-bsd New BSD License
Synopsis
class Zend_Http_Client_Adapter_Socket
implements
Zend_Http_Client_Adapter_Interface
{
- // members
- protected resource|null $socket = NULL;
- protected array $connected_to = ;
- protected array $config = ;
- protected $method = NULL;
- // methods
- public void __construct()
- public void setConfig()
- public void connect()
- public string write()
- public string read()
- public void close()
- public void __destruct()
Hierarchy
Implements
Members
protected
- $config
—
array
Parameters array - $connected_to
—
array
What host/port are we connected to? - $method
—
string
Request method - will be set by write() and might be used by read() - $socket
—
resource|null
The socket for server connection
Methods
public
- __construct() — Adapter constructor, currently empty. Config is set using setConfig()
- __destruct() — Destructor: make sure the socket is disconnected
- close() — Close the connection to the server
- connect() — Connect to the remote server
- read() — Read response from server
- setConfig() — Set the configuration array for the adapter
- write() — Send request to the remote server