mirror of
https://github.com/danog/byte-stream.git
synced 2024-12-02 09:17:50 +01:00
22 lines
355 B
PHP
22 lines
355 B
PHP
<?php
|
|
|
|
namespace Amp\ByteStream;
|
|
|
|
use Amp\Promise;
|
|
|
|
interface WritableStream {
|
|
/**
|
|
* @param string $data
|
|
*
|
|
* @return \Amp\Promise<int>
|
|
*/
|
|
public function write(string $data): Promise;
|
|
|
|
/**
|
|
* @param string $data
|
|
*
|
|
* @return \Amp\Promise<int>
|
|
*/
|
|
public function end(string $data = ''): Promise;
|
|
}
|