# Class: DatagramPacket

## vertx-js/datagram_packet~ DatagramPacket

#### new DatagramPacket()

  A received datagram packet (UDP) which contains the data and information about the sender of the data itself.
  Source:
    - datagram_packet.js, line 31

### Methods

#### data() → {Buffer}

  Returns the data of the DatagramPacket
  Source:
    - datagram_packet.js, line 58

  ##### Returns:

  the data
  Type
    Buffer

#### sender() → {SocketAddress}

  Returns the SocketAddress of the sender that sent this DatagramPacket.
  Source:
    - datagram_packet.js, line 44

  ##### Returns:

  the address of the sender
  Type
    SocketAddress