This repository was archived by the owner on Jan 10, 2022. It is now read-only.

Description
I'm trying to connect to server on my localhost as below:
$address = 'tcp://localhost:5222';
$username = 'admin@localhost';
$password = 'admin';
$options = new Options($address);
$options->setUsername($username)
->setPassword($password)
->setTo('localhost')
->setContextOptions([
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true,
]
]);
$client = new Client($options);
$client->connect();
But it returns this error:
stream_socket_enable_crypto(): SSL: Success