Represents a stream of data that can be written to.
Any class that implements this interface can be used by a @see \io\vertx\jphp\core\streams\Pipe to pipe data from a ReadStream
to it.
| package |
Default |
|---|
__construct()
drainHandler( $arg0) : $this
The stream implementation defines when the drain handler, for example it could be when the queue size has been
reduced to maxSize / 2.
callable
$thisa reference to this, so the API can be used fluently
end( $arg0 = null, $arg1 = null) : void
Once the stream has ended, it cannot be used any more.
end()
Same as @see \io\vertx\jphp\core\streams\WriteStream::end but with an handler called when the operation completes
param $handler [callable]
end($handler)
Same as @see \io\vertx\jphp\core\streams\WriteStream::end but writes some data to the stream before ending.
param $data [mixed] the data to write
end($data)
Same as but with an handler called when the operation completes
param $data [mixed]
param $handler [callable]
end($data, $handler)
callable | mixed
callable
exceptionHandler( $arg0) : $this
callable
$thisa reference to this, so the API can be used fluently
setWriteQueueMaxSize( $arg0) : $this
The value is defined by the implementation of the stream, e.g in bytes for a
| see |
\io\vertx\jphp\core\net\NetSocket,
the number of @see \io\vertx\jphp\core\eventbus\Message for a \io\vertx\jphp\core\eventbus\MessageProducer,etc... |
|---|
integer
$thisa reference to this, so the API can be used fluently
write( $arg0, $arg1 = null) : $this
param $data [mixed] the data to write write($data)
Same as but with an handler called when the operation completes
param $data [mixed] param $handler [callable] write($data, $handler)
mixed
callable
$thisa reference to this, so the API can be used fluently
writeQueueFull() : boolean
booleantrue if write queue is full