/** * Constructor * * @param string host hostname or IP address * @param int port * @param resource socket default NULL * @param int version default NULL */ public function __construct($host, $port, $socket = null, $version = null) { parent::__construct($host, $port, $socket); switch ($version) { case 2: $this->cryptoImpl = STREAM_CRYPTO_METHOD_SSLv2_CLIENT; break; case 3: $this->cryptoImpl = STREAM_CRYPTO_METHOD_SSLv3_CLIENT; break; default: $this->cryptoImpl = STREAM_CRYPTO_METHOD_SSLv23_CLIENT; break; } }
/** * Constructor * * @param string host hostname or IP address * @param int port * @param resource socket default NULL */ public function __construct($host, $port, $socket = null) { parent::__construct($host, $port, $socket); $this->_prefix = 'tls://'; }
/** * Constructor * * @param string host hostname or IP address * @param int port * @param resource socket default NULL * @param int version default NULL */ public function __construct($host, $port, $socket = null, $version = null) { parent::__construct($host, $port, $socket); $this->_prefix = 'ssl' . ($version ? 'v' . $version : '') . '://'; }
/** * Constructor * * @param string host hostname or IP address * @param int port * @param resource socket default NULL */ public function __construct($host, $port, $socket = null) { parent::__construct($host, $port, $socket); $this->cryptoImpl = STREAM_CRYPTO_METHOD_TLS_CLIENT; }