Package: io.vertx.groovy.core.datagram

## [Groovy] Class PacketWritestream

- io.vertx.groovy.core.datagram.PacketWritestream

- All Implemented Interfaces and Traits:
    WriteStream

      @groovy.transform.CompileStatic
      class PacketWritestream
      extends java.lang.Object

  A WriteStream for sending packets to a SocketAddress. The stream is called when the write fails.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `PacketWritestream (java.lang.Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `PacketWritestream` | `drainHandler(io.vertx.core.Handler<java.lang.Void> handler)`
    `void` | `end()` Ends the stream.
    `void` | `end(Buffer t)` Same as WriteStream.end but writes some data to the stream before ending.
    `PacketWritestream` | `exceptionHandler(io.vertx.core.Handler<java.lang.Throwable> handler)`
    `java.lang.Object` | `getDelegate()`
    `PacketWritestream` | `setWriteQueueMaxSize(int maxSize)`
    `PacketWritestream` | `write(Buffer data)`
    `boolean` | `writeQueueFull()` This will return `true` if there are more bytes in the write queue than the value set using PacketWritestream.setWriteQueueMaxSize

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Constructor Detail

    - #### PacketWritestream(java.lang.Object delegate)

  - ### Method Detail

    - #### PacketWritestream drainHandler(io.vertx.core.Handler<java.lang.Void> handler)

    - #### void end()

      Ends the stream.

      Once the stream has ended, it cannot be used any more.

    - #### void end(Buffer t)

      Same as WriteStream.end but writes some data to the stream before ending.

      Parameters:
        t

    - #### PacketWritestream exceptionHandler(io.vertx.core.Handler<java.lang.Throwable> handler)

    - #### java.lang.Object getDelegate()

    - #### PacketWritestream setWriteQueueMaxSize(int maxSize)

    - #### PacketWritestream write(Buffer data)

    - #### boolean writeQueueFull()

      This will return `true` if there are more bytes in the write queue than the value set using PacketWritestream.setWriteQueueMaxSize

      Returns:
        true if write queue is full