Class List Method List File List

# Class: Vertx::DatagramPacket

Inherits:
  Object
  - Object
  - Vertx::DatagramPacket
  show all
Defined in:
  /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/src/main/resources/vertx/datagram_packet.rb

## Overview

A received datagram packet (UDP) which contains the data and information about the sender of the data itself.

## Instance Method Summary (collapse)

- - (::Vertx::Buffer) data
  Returns the data of the DatagramPacket.
- - (::Vertx::SocketAddress) sender
  Returns the SocketAddress of the sender that sent this DatagramPacket.

## Instance Method Details

### - (`::Vertx::Buffer`) data

Returns the data of the Vertx::DatagramPacket

Returns:

- (`::Vertx::Buffer`) —
  the data

Raises:

- (`ArgumentError`)

    29
    30
    31
    32
    33
    34
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/src/main/resources/vertx/datagram_packet.rb', line 29

    def data
      if !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:data, []).call(),::Vertx::Buffer)
      end
      raise ArgumentError, "Invalid arguments when calling data()"
    end

### - (`::Vertx::SocketAddress`) sender

Returns the SocketAddress of the sender that sent this Vertx::DatagramPacket.

Returns:

- (`::Vertx::SocketAddress`) —
  the address of the sender

Raises:

- (`ArgumentError`)

    21
    22
    23
    24
    25
    26
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/src/main/resources/vertx/datagram_packet.rb', line 21

    def sender
      if !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:sender, []).call(),::Vertx::SocketAddress)
      end
      raise ArgumentError, "Invalid arguments when calling sender()"
    end