public interface PacketWritestream extends WriteStream<Buffer>
WriteStream for sending packets to a SocketAddress.
The stream WriteStream.exceptionHandler(io.vertx.core.Handler<java.lang.Throwable>) is called when the write fails.| Modifier and Type | Method and Description |
|---|---|
PacketWritestream |
drainHandler(Handler<Void> handler)
Set a drain handler on the stream.
|
PacketWritestream |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the write stream.
|
PacketWritestream |
setWriteQueueMaxSize(int maxSize)
Set the maximum size of the write queue to
maxSize. |
PacketWritestream |
write(Buffer data)
Write some data to the stream.
|
writeQueueFullPacketWritestream exceptionHandler(Handler<Throwable> handler)
WriteStreamexceptionHandler in interface StreamBaseexceptionHandler in interface WriteStream<Buffer>handler - the exception handlerPacketWritestream write(Buffer data)
WriteStreamWriteStream.writeQueueFull() method before writing. This is done automatically if using a Pump.write in interface WriteStream<Buffer>data - the data to writePacketWritestream setWriteQueueMaxSize(int maxSize)
WriteStreammaxSize. You will still be able to write to the stream even
if there is more than maxSize bytes in the write queue. This is used as an indicator by classes such as
Pump to provide flow control.setWriteQueueMaxSize in interface WriteStream<Buffer>maxSize - the max size of the write streamPacketWritestream drainHandler(Handler<Void> handler)
WriteStreamPump for an example of this being used.drainHandler in interface WriteStream<Buffer>handler - the handlerCopyright © 2015. All rights reserved.