Skip to content

Commit

Permalink
support ssl
Browse files Browse the repository at this point in the history
  • Loading branch information
walkor committed Jan 24, 2023
1 parent e25d249 commit 42e9aec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ public function connect()
$timeout = isset($this->_options['connect_timeout']) ? $this->_options['connect_timeout'] : 5;
$context = isset($this->_options['context']) ? $this->_options['context'] : [];
$this->_connection = new AsyncTcpConnection($this->_address, $context);
if(!empty($this->_options['ssl'])){
$this->_connection->transport = 'ssl';
}

$this->_connection->onConnect = function () {
$this->_waiting = false;
Expand Down

0 comments on commit 42e9aec

Please sign in to comment.