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

(so) Socket adapter sendUrgentData throws IllegalBlockingMode when channel configured non-blocking

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • core-libs
    • b54
    • Verified

        sc.socket().sendUrgentData(b) throws IllegalBlockingMode when channel configured non-blocking. This is correct behavior because java.net.Socket is blocking only and Socket operations are expected to block.

        It has been suggested that that sendUrgentData should work with SocketChannel's configured non-blocking. In order to do this then it requires understanding how send(MSG_OOB) behaves when the socket buffer is full and whether send can return EAGAIN/EWOULDBLOCK.

        The data that have so far is:

        Linux - returns EAGAIN/EWOULDBLOCK
        OSX - fails with "No buffer space available"
        Windows - fails with " Resource temporarily unavailable: no further information"

        The I/O error is okay as that is allowed by the spec.




              bpb Brian Burkhalter
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: