1
0
mirror of https://github.com/danog/byte-stream.git synced 2024-12-02 09:17:50 +01:00
byte-stream/lib/WritableStream.php
2017-04-04 11:19:52 -05:00

29 lines
484 B
PHP

<?php
namespace Amp\ByteStream;
use Amp\Promise;
interface WritableStream {
/**
* Determines if the stream is writable.
*
* @return bool
*/
public function isWritable(): bool;
/**
* @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;
}