90 lines
1.3 KiB
Markdown
90 lines
1.3 KiB
Markdown
---
|
|
title: danog\MadelineProto\Loop\Connection\ReadLoop: Socket read loop.
|
|
description:
|
|
|
|
---
|
|
# `danog\MadelineProto\Loop\Connection\ReadLoop`
|
|
[Back to index](../../../../index.md)
|
|
|
|
> Author: Daniil Gentili <daniil@daniil.it>
|
|
|
|
|
|
Socket read loop.
|
|
|
|
|
|
|
|
|
|
---
|
|
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
|
## Method list:
|
|
* `loop(): \Generator`
|
|
* `start(): bool`
|
|
* `isRunning(): bool`
|
|
* `signal(mixed|\Throwable $what): void`
|
|
* `waitSignal(\Promise|\Generator $promise): \Promise`
|
|
|
|
## Methods:
|
|
### `loop(): \Generator`
|
|
|
|
Main loop.
|
|
|
|
|
|
#### See also:
|
|
* `\Generator`
|
|
|
|
|
|
|
|
|
|
### `start(): bool`
|
|
|
|
Start the loop.
|
|
Returns false if the loop is already running.
|
|
|
|
|
|
### `isRunning(): bool`
|
|
|
|
Check whether loop is running.
|
|
|
|
|
|
|
|
### `signal(mixed|\Throwable $what): void`
|
|
|
|
Send signal to loop.
|
|
|
|
|
|
Parameters:
|
|
* `$what`: `mixed|\Throwable` Data to signal
|
|
|
|
|
|
#### See also:
|
|
* `\Throwable`
|
|
|
|
|
|
|
|
|
|
### `waitSignal(\Promise|\Generator $promise): \Promise`
|
|
|
|
Resolve the promise or return|throw the signal.
|
|
|
|
|
|
Parameters:
|
|
* `$promise`: `\Promise|\Generator` The original promise or generator
|
|
Full type:
|
|
```
|
|
\Promise<\T>|\Generator<mixed, \Promise|array<array-key, \Promise>, mixed, \Promise<\T>|\T>
|
|
```
|
|
|
|
|
|
Fully typed return value:
|
|
```
|
|
\Promise<\T|mixed>
|
|
```
|
|
#### See also:
|
|
* `\Promise`
|
|
* `\Generator`
|
|
* `\T`
|
|
|
|
|
|
|
|
|