Class List Method List File List

# Class: Vertx::DatagramPacket

Inherits:
  Object
  - Object
  - Vertx::DatagramPacket
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/datagram_packet.rb

## Instance Method Summary (collapse)

- - (Object) data
- - (DatagramPacket) initialize(j_del) constructor
  A new instance of DatagramPacket.
- - (Object) j_del
- - (Object) sender

## Constructor Details

### - (`DatagramPacket`) initialize(j_del)

Returns a new instance of DatagramPacket

    10
    11
    12
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/datagram_packet.rb', line 10

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) data

Raises:

- (`ArgumentError`)

    29
    30
    31
    32
    33
    34
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/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

### - (`Object`) j_del

    15
    16
    17
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/datagram_packet.rb', line 15

    def j_del
      @j_del
    end

### - (`Object`) sender

Raises:

- (`ArgumentError`)

    21
    22
    23
    24
    25
    26
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/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