mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
curl get requests support custom headers now, event to get content of thread output, shutdown function which saves world if server stopped with error
This commit is contained in:
parent
0088f2d86d
commit
4bd682b08e
5 changed files with 43 additions and 16 deletions
|
|
@ -8,7 +8,6 @@ class AsyncMultipleQueue extends Thread{
|
|||
public $input;
|
||||
public $output;
|
||||
public $stop;
|
||||
|
||||
public function __construct(){
|
||||
$this->input = "";
|
||||
$this->output = "";
|
||||
|
|
@ -24,8 +23,8 @@ class AsyncMultipleQueue extends Thread{
|
|||
case ASYNC_CURL_GET:
|
||||
$url = $this->get(Utils::readShort($this->get(2), false));
|
||||
$timeout = Utils::readShort($this->get(2));
|
||||
|
||||
$res = (string) Utils::curl_get($url, $timeout);
|
||||
$headers = $this->get(Utils::readShort($this->get(2), false));
|
||||
$res = (string) Utils::curl_get($url, $timeout, $headers);
|
||||
//$this->lock();
|
||||
$this->output .= Utils::writeInt($rID) . Utils::writeShort(ASYNC_CURL_GET) . Utils::writeInt(strlen($res)) . $res;
|
||||
//$this->unlock();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue