jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java
changeset 12547 ae1b2051db5d
parent 12440 2689ca179e22
child 12889 3ecbb4f2b752
child 12891 5dbaa8f0f72e
equal deleted inserted replaced
12546:fb0286d50ed8 12547:ae1b2051db5d
   742                     InetSocketAddress isa = (InetSocketAddress)remoteAddress;
   742                     InetSocketAddress isa = (InetSocketAddress)remoteAddress;
   743                     SecurityManager sm = System.getSecurityManager();
   743                     SecurityManager sm = System.getSecurityManager();
   744                     if (sm != null)
   744                     if (sm != null)
   745                         sm.checkConnect(isa.getAddress().getHostAddress(),
   745                         sm.checkConnect(isa.getAddress().getHostAddress(),
   746                                         isa.getPort());
   746                                         isa.getPort());
   747                     disconnect0(fd);
   747                     boolean isIPv6 = (family == StandardProtocolFamily.INET6);
       
   748                     disconnect0(fd, isIPv6);
   748                     remoteAddress = null;
   749                     remoteAddress = null;
   749                     state = ST_UNCONNECTED;
   750                     state = ST_UNCONNECTED;
   750 
   751 
   751                     // refresh local address
   752                     // refresh local address
   752                     localAddress = Net.localAddress(fd);
   753                     localAddress = Net.localAddress(fd);
  1077 
  1078 
  1078     // -- Native methods --
  1079     // -- Native methods --
  1079 
  1080 
  1080     private static native void initIDs();
  1081     private static native void initIDs();
  1081 
  1082 
  1082     private static native void disconnect0(FileDescriptor fd)
  1083     private static native void disconnect0(FileDescriptor fd, boolean isIPv6)
  1083         throws IOException;
  1084         throws IOException;
  1084 
  1085 
  1085     private native int receive0(FileDescriptor fd, long address, int len,
  1086     private native int receive0(FileDescriptor fd, long address, int len,
  1086                                 boolean connected)
  1087                                 boolean connected)
  1087         throws IOException;
  1088         throws IOException;