$proxy, 'timeout' => 3.0, 'dns' => false )); } $connector->connect('tls://google.com:443')->then(function (ConnectionInterface $stream) { $stream->write("GET / HTTP/1.1\r\nHost: google.com\r\nConnection: close\r\n\r\n"); $stream->on('data', function ($chunk) { echo $chunk; }); }, 'printf'); $loop->run();