amphp/socket
is a socket lib for establishing and encrypting non-blocking sockets in the amp
concurrency framework.
Required PHP Version
- PHP 5.5+
Installation
$ composer require amphp/socket: dev-master
Example
<?php
Amp\run(function () {
$socket = (yield Amp\Socket\connect('www.google.com:80'));
});