Kraken\Ipc\Socket\Socket::__construct PHP Метод

__construct() публичный Метод

public __construct ( string | resource $endpointOrResource, Kraken\Loop\LoopInterface $loop, mixed[] $config = [] )
$endpointOrResource string | resource
$loop Kraken\Loop\LoopInterface
$config mixed[]
    public function __construct($endpointOrResource, LoopInterface $loop, $config = [])
    {
        try {
            if (!is_resource($endpointOrResource)) {
                $endpointOrResource = $this->createClient($endpointOrResource, $config);
            }
            parent::__construct($endpointOrResource, $loop);
        } catch (Error $ex) {
            throw new InstantiationException('SocketClient could not be created.');
        } catch (Exception $ex) {
            throw new InstantiationException('SocketClient could not be created.');
        }
    }