lithium\net\Socket::__construct()
Constructor.
Parameters
-
array
$configAvailable configuration options are:
'persistent': Use a persistent connection (defaults tofalse).'protocol': Transfer protocol to use (defaults to'tcp').'host': Host name or address (defaults to'localhost').'login': Username for a login (defaults to'root').'password': Password for a login (defaults to'').'port': Host port (defaults to80).'timeout': Seconds after opening the socket times out (defaults to30).
Returns
voidSource
public function __construct(array $config = []) {
$defaults = [
'persistent' => false,
'scheme' => 'tcp',
'host' => 'localhost',
'port' => 80,
'timeout' => 30
];
parent::__construct($config + $defaults);
}