public function listen(): Promise
    {
        return call(function () {
            while (null !== ($chunk = yield $this->stream->read())) {
                foreach ($this->onNewFrameCallables as $newFrameCallable) {
                    $newFrameCallable($this->transformChunk($chunk));
                }
            }
        });
    }
public function listen(): Promise
    {
        return call(function () {
            while (null !== ($chunk = yield $this->stream->read())) {
                foreach ($this->onNewFrameCallables as $newFrameCallable) {
                    $newFrameCallable($this->transformChunk($chunk));
                }
            }
        });
    }
public function listen ( ) : Promise { return call ( function ( ) { while ( null !== ( $ chunk = yield $ this -> stream -> read ( ) ) ) { foreach ( $ this -> onNewFrameCallables as $ newFrameCallable ) { $ newFrameCallable ( $ this -> transformChunk ( $ chunk ) ) ; } } } ) ; }
Consume stream chunks.

@return Promise
Consume stream chunks .