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

DatagramSocket.receive() is broken under WIN32 on JDK1.2T. Get socket exception.

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.2beta3
    • CPU:
      x86
    • OS:
      windows_95
    • Verification:
      Not verified

      Description

      I get the following socket exception from WINDOWS 95 when trying to
      start up the udpServer test application using JDK1.2T. I don't see
      the problem on SOLARIS 2.6.

      It seems that datagram socket receive is broken for WIN32. It does
      not block and wait for an incomming datagram packet from the udpClient
      test application like it should. This works on SOLARIS.

      [win95]: which java
      I:\JDK1.2_LATEST\WIN32\BIN\java.exe

      [win95]: java -version
      java version "1.2beta2"

      [win95]: java -fullversion
      java full version "JDK1.2T"

      [win95]: java udpServer -d -v -l 0
      VERBOSE: port number is = 26000
      VERBOSE: loop count is = 0
      DEBUG: creating datagram socket on port 26000
      DEBUG: DATAGRAM SOCKET INFO
      DEBUG: --------------------
      DEBUG: getLocalPort() = 26000
      DEBUG: getSoTimeout() = 0
      DEBUG: Dump getLocalAddress()
      DEBUG: INET ADDRESS INFO
      DEBUG: -----------------
      DEBUG: getHostName() = 0.0.0.0
      DEBUG: getAllByName[0] = 0.0.0.0/0.0.0.0
      DEBUG: getByName() = 0.0.0.0/0.0.0.0
      DEBUG: getLocalHost() = aefpc.east.sun.com/129.148.27.249
      DEBUG: getHostAddress() = 0.0.0.0
      DEBUG: isMulticastAddress() = false
      ERROR: udpServer.udpServer(): caught exception
      java.net.SocketException: socket closed
      java.net.SocketException: socket closed
      at java.net.PlainDatagramSocketImpl.receive(Native Method)
      at java.net.DatagramSocket.receive(DatagramSocket.java:223)
      at udpServer.<init>(udpServer.java:107)
      at udpServer.main(udpServer.java:58)
      FINALSTATS:udpServer:EXIT_ERROR:2:ERRORS:1

      As part of the attachment I will include the UDP Client/Server Test Application.
      If you invoke this same command on SOLARIS 2.6 it works.

      I added the latest udpClient/Server code as part of the attachment. udp.tar.Z

        Attachments

          Activity

            People

            Assignee:
            brenaudsunw Benjamin Renaud (Inactive)
            Reporter:
            aefreche Alan Frechette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: