Class DatagramPacket

    • Constructor Detail

      • DatagramPacket

        public DatagramPacket​(io.netty5.buffer.Buffer message,
                              SocketAddress recipient,
                              SocketAddress sender)
        Create a new instance with the specified packet data, recipient address, and sender address.
      • DatagramPacket

        public DatagramPacket​(io.netty5.buffer.Buffer message,
                              SocketAddress recipient)
        Create a new instance with the specified packet data and recipient address.
    • Method Detail

      • replace

        public DatagramPacket replace​(io.netty5.buffer.Buffer content)
        Description copied from class: BufferAddressedEnvelope
        Create a new addressed envelope instance, that has the same recipient and sender as this one, but the given content.
        Specified by:
        replace in class BufferAddressedEnvelope<SocketAddress,​DatagramPacket>
        Parameters:
        content - The contents of the returned addressed envelope instance.
        Returns:
        An addressed envelope instance that has the same recipient and sender as this one, but the given content.