Browse Source

draft async request for sync gemini/next api

PHP-GTK3
yggverse 5 months ago
parent
commit
3ff79cb0be
  1. 18
      src/Model/Connection.php

18
src/Model/Connection.php

@ -33,22 +33,36 @@ class Connection extends \Yggverse\Yoda\Abstract\Model\Connection @@ -33,22 +33,36 @@ class Connection extends \Yggverse\Yoda\Abstract\Model\Connection
break;
case 'gemini':
case 'gemini': // async
$pid = pcntl_fork();
if ($pid === 0)
{
(new Gemini($this))->request(
$address,
$timeout
);
exit;
}
break;
case 'nex':
case 'nex': // async
$pid = pcntl_fork();
if ($pid === 0)
{
(new Nex($this))->request(
$address,
$timeout
);
exit;
}
break;
case null: // no scheme provided

Loading…
Cancel
Save