equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
55 import java.util.Set; |
55 import java.util.Set; |
56 import java.util.concurrent.locks.ReentrantLock; |
56 import java.util.concurrent.locks.ReentrantLock; |
57 |
57 |
58 import sun.net.ResourceManager; |
58 import sun.net.ResourceManager; |
59 import sun.net.ext.ExtendedSocketOptions; |
59 import sun.net.ext.ExtendedSocketOptions; |
60 import static sun.net.ext.ExtendedSocketOptions.SOCK_DGRAM; |
|
61 |
60 |
62 /** |
61 /** |
63 * An implementation of DatagramChannels. |
62 * An implementation of DatagramChannels. |
64 */ |
63 */ |
65 |
64 |
333 set.add(StandardSocketOptions.SO_BROADCAST); |
332 set.add(StandardSocketOptions.SO_BROADCAST); |
334 set.add(StandardSocketOptions.IP_TOS); |
333 set.add(StandardSocketOptions.IP_TOS); |
335 set.add(StandardSocketOptions.IP_MULTICAST_IF); |
334 set.add(StandardSocketOptions.IP_MULTICAST_IF); |
336 set.add(StandardSocketOptions.IP_MULTICAST_TTL); |
335 set.add(StandardSocketOptions.IP_MULTICAST_TTL); |
337 set.add(StandardSocketOptions.IP_MULTICAST_LOOP); |
336 set.add(StandardSocketOptions.IP_MULTICAST_LOOP); |
338 set.addAll(ExtendedSocketOptions.options(SOCK_DGRAM)); |
337 set.addAll(ExtendedSocketOptions.datagramSocketOptions()); |
339 return Collections.unmodifiableSet(set); |
338 return Collections.unmodifiableSet(set); |
340 } |
339 } |
341 } |
340 } |
342 |
341 |
343 @Override |
342 @Override |