MCPcopy Create free account
hub / github.com/apache/thrift / __construct

Method __construct

lib/php/lib/Transport/TSSLSocket.php:52–66  ·  view source on GitHub ↗

* Socket constructor * * @param string $host Remote hostname * @param int $port Remote port * @param resource $context Stream context * @param bool $persist Whether to use a persistent socket * @param string $debugHandler Function to call for error logging */

(
        $host = 'localhost',
        $port = 9090,
        $context = null,
        $debugHandler = null
    )

Source from the content-addressed store, hash-verified

50 * @param string $debugHandler Function to call for error logging
51 */
52 public function __construct(
53 $host = 'localhost',
54 $port = 9090,
55 $context = null,
56 $debugHandler = null
57 ) {
58 $this->host_ = $this->getSSLHost($host);
59 $this->port_ = $port;
60 // Initialize a stream context if not provided
61 if ($context === null) {
62 $context = stream_context_create();
63 }
64 $this->context_ = $context;
65 $this->debugHandler_ = $debugHandler ? $debugHandler : 'error_log';
66 }
67
68 /**
69 * Creates a host name with SSL transport protocol

Callers

nothing calls this directly

Calls 1

getSSLHostMethod · 0.95

Tested by

no test coverage detected