2020-10-15 18:42:54 +02:00
|
|
|
---
|
|
|
|
title: danog\MadelineProto\Stream\StreamInterface: Generic stream interface.
|
|
|
|
description:
|
|
|
|
|
|
|
|
---
|
|
|
|
# `danog\MadelineProto\Stream\StreamInterface`
|
|
|
|
[Back to index](../../../index.md)
|
|
|
|
|
|
|
|
> Author: Daniil Gentili <daniil@daniil.it>
|
|
|
|
|
|
|
|
|
|
|
|
Generic stream interface.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Method list:
|
|
|
|
* `connect(\danog\MadelineProto\Stream\ConnectionContext $ctx): \Generator`
|
|
|
|
* `disconnect(): void`
|
|
|
|
* `getSocket(): \Amp\Socket\EncryptableSocket`
|
|
|
|
|
|
|
|
## Methods:
|
|
|
|
### `connect(\danog\MadelineProto\Stream\ConnectionContext $ctx): \Generator`
|
|
|
|
|
|
|
|
Connect to a server.
|
|
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
* `$ctx`: `\danog\MadelineProto\Stream\ConnectionContext` The connection context
|
|
|
|
|
|
|
|
|
|
|
|
#### See also:
|
|
|
|
* [`\danog\MadelineProto\Stream\ConnectionContext`: Connection context class.](./ConnectionContext.md)
|
|
|
|
* `\Generator`
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-15 19:11:10 +02:00
|
|
|
---
|
|
|
|
Generated by [danog/phpdoc](https://phpdoc.daniil.it)
|
2020-10-15 18:42:54 +02:00
|
|
|
|
|
|
|
### `disconnect(): void`
|
|
|
|
|
|
|
|
Disconnect from the server.
|
|
|
|
|
|
|
|
|
2020-10-15 19:11:10 +02:00
|
|
|
---
|
|
|
|
Generated by [danog/phpdoc](https://phpdoc.daniil.it)
|
2020-10-15 18:42:54 +02:00
|
|
|
|
|
|
|
### `getSocket(): \Amp\Socket\EncryptableSocket`
|
|
|
|
|
|
|
|
Get underlying AMPHP socket resource.
|
|
|
|
|
|
|
|
|
|
|
|
#### See also:
|
|
|
|
* `\Amp\Socket\EncryptableSocket`
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-15 19:11:10 +02:00
|
|
|
---
|
|
|
|
Generated by [danog/phpdoc](https://phpdoc.daniil.it)
|
2020-10-15 18:42:54 +02:00
|
|
|
|
2020-10-15 19:11:10 +02:00
|
|
|
---
|
|
|
|
Generated by [danog/phpdoc](https://phpdoc.daniil.it)
|