equal
deleted
inserted
replaced
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; |