Merge branch 'master' of https://github.com/danog/MadelineProto
This commit is contained in:
commit
4d8ed0582e
7
a.php
7
a.php
@ -1,7 +1,12 @@
|
||||
<?php
|
||||
|
||||
$payload = base64_decode('NAAAAAAAAAAAAAAAAAAAAAAAAAC06N5YFAAAAHiXRmAwx9DuB28gQszy/RHjhN2RdLkYdQ==');
|
||||
$socket = fsockopen('tcp://149.154.167.91:443'); // DC 4
|
||||
$socket = fsockopen('tcp://149.154.167.50:443'); // DC 2
|
||||
stream_set_timeout($socket, 5);
|
||||
echo 'Wrote '.fwrite($socket, $payload).' bytes'.PHP_EOL;
|
||||
if (strlen(fread($socket, 100))) echo 'Read 100 bytes from socket'.PHP_EOL; else echo 'No data could be read from socket'.PHP_EOL;
|
||||
if (strlen(fread($socket, 100))) {
|
||||
echo 'Read 100 bytes from socket'.PHP_EOL;
|
||||
} else {
|
||||
echo 'No data could be read from socket'.PHP_EOL;
|
||||
}
|
||||
|
@ -96,7 +96,9 @@ class API extends APIFactory
|
||||
{
|
||||
set_error_handler(['\danog\MadelineProto\Exception', 'ExceptionErrorHandler']);
|
||||
$this->setup_threads();
|
||||
if (!isset($this->messages)) $this->APIFactory();
|
||||
if (!isset($this->messages)) {
|
||||
$this->APIFactory();
|
||||
}
|
||||
}
|
||||
|
||||
public function __destruct()
|
||||
|
@ -703,7 +703,6 @@ description: Any json-encodable data
|
||||
|
||||
Any json-encodable data.');
|
||||
|
||||
|
||||
\danog\MadelineProto\Logger::log(['Done!'], \danog\MadelineProto\Logger::NOTICE);
|
||||
}
|
||||
}
|
||||
|
@ -104,7 +104,6 @@ class MTProto
|
||||
$this->should_serialize = true;
|
||||
}
|
||||
|
||||
|
||||
public function __wakeup()
|
||||
{
|
||||
if (class_exists('\Thread') && method_exists('\Thread', 'getCurrentThread') && is_object(\Thread::getCurrentThread())) {
|
||||
|
@ -576,6 +576,7 @@ trait TL
|
||||
if ($x['_'] === 'dataJSON') {
|
||||
return json_decode($x['data'], true);
|
||||
}
|
||||
|
||||
return $x;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user