Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4028914

DatagramPacket buffer reuse

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.1
    • core-libs
    • None
    • x86
    • windows_95



      Name: mc57594 Date: 01/29/97


      I have observed that due to an internal length field in Datagram
      Packet, it is not wise to try to reuse DatagramPackets. For instance,
      if I recieve a DatagramPacket and the data contained in the byte
      array is 100 bytes (assume the actual buffer is arbitrarily larger)
      and then reuse the DatagramPacket to recieve a packet that might
      really be larger than 100 bytes. I will only see 100 bytes of the
      packet that actually was much larger.
      ======================================================================

            brenaudsunw Benjamin Renaud (Inactive)
            mchamnessunw Mark Chamness (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: