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

22 lines
355 B
PHP
Raw Normal View History

2016-12-30 06:09:06 +01:00
<?php
2016-08-16 23:23:46 +02:00
namespace Amp\ByteStream;
2016-08-10 23:48:42 +02:00
use Amp\Promise;
2016-08-16 00:19:32 +02:00
interface WritableStream {
2016-08-10 23:48:42 +02:00
/**
* @param string $data
*
* @return \Amp\Promise<int>
2016-08-10 23:48:42 +02:00
*/
2016-11-14 22:05:19 +01:00
public function write(string $data): Promise;
2016-08-10 23:48:42 +02:00
/**
* @param string $data
*
* @return \Amp\Promise<int>
2016-08-10 23:48:42 +02:00
*/
2016-11-14 22:05:19 +01:00
public function end(string $data = ''): Promise;
2016-08-10 23:48:42 +02:00
}