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

Socket / DatagramSocket should specify buffer size unit

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 13
    • Fix Version/s: tbd
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      A DESCRIPTION OF THE PROBLEM :
      java.net.Socket and java.net.DatagramSocket have methods for modifying the send and receive buffer size. However, apparently nowhere in the documentation is the data unit specified, so it is not clear whether it is bit or byte. One could deduce the data unit from the option meaning for Linux (socket(7)), however it would be better if the data unit was mentioned in the Java documentation.

      Affected:
      https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/net/SocketOptions.html#SO_SNDBUF
      https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/net/SocketOptions.html#SO_RCVBUF

      https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/net/Socket.html#getReceiveBufferSize()
      https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/net/Socket.html#getSendBufferSize()
      https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/net/Socket.html#setReceiveBufferSize(int)
      https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/net/Socket.html#setSendBufferSize(int)

      https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/net/DatagramSocket.html#getReceiveBufferSize()
      https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/net/DatagramSocket.html#getSendBufferSize()
      https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/net/DatagramSocket.html#setReceiveBufferSize(int)
      https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/net/DatagramSocket.html#setSendBufferSize(int)


        Attachments

          Activity

            People

            • Assignee:
              dfuchs Daniel Fuchs
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: