jdk/src/share/classes/sun/nio/ch/Net.java
changeset 25170 f58832169add
parent 23879 284802a2d355
equal deleted inserted replaced
25169:365cba5326f9 25170:f58832169add
   350             boolean b = ((Boolean)value).booleanValue();
   350             boolean b = ((Boolean)value).booleanValue();
   351             arg = (b) ? 1 : 0;
   351             arg = (b) ? 1 : 0;
   352         }
   352         }
   353 
   353 
   354         boolean mayNeedConversion = (family == UNSPEC);
   354         boolean mayNeedConversion = (family == UNSPEC);
   355         setIntOption0(fd, mayNeedConversion, key.level(), key.name(), arg);
   355         boolean isIPv6 = (family == StandardProtocolFamily.INET6);
       
   356         setIntOption0(fd, mayNeedConversion, key.level(), key.name(), arg, isIPv6);
   356     }
   357     }
   357 
   358 
   358     static Object getSocketOption(FileDescriptor fd, ProtocolFamily family,
   359     static Object getSocketOption(FileDescriptor fd, ProtocolFamily family,
   359                                   SocketOption<?> name)
   360                                   SocketOption<?> name)
   360         throws IOException
   361         throws IOException
   497     private static native int getIntOption0(FileDescriptor fd, boolean mayNeedConversion,
   498     private static native int getIntOption0(FileDescriptor fd, boolean mayNeedConversion,
   498                                             int level, int opt)
   499                                             int level, int opt)
   499         throws IOException;
   500         throws IOException;
   500 
   501 
   501     private static native void setIntOption0(FileDescriptor fd, boolean mayNeedConversion,
   502     private static native void setIntOption0(FileDescriptor fd, boolean mayNeedConversion,
   502                                              int level, int opt, int arg)
   503                                              int level, int opt, int arg, boolean isIPv6)
   503         throws IOException;
   504         throws IOException;
   504 
   505 
   505     static native int poll(FileDescriptor fd, int events, long timeout)
   506     static native int poll(FileDescriptor fd, int events, long timeout)
   506         throws IOException;
   507         throws IOException;
   507 
   508