/libcore/luni/src/test/java/libcore/java/net/ |
D | InetSocketAddressTest.java | 20 import java.net.InetSocketAddress; 26 new InetSocketAddress("127.0.0.1", -1); in test_ConstructorLjava_lang_StringI() 31 new InetSocketAddress("127.0.0.1", 65536); in test_ConstructorLjava_lang_StringI() 60 InetSocketAddress isa = new InetSocketAddress(ia, 80); in test_ConstructorLInetAddressI() 65 InetSocketAddress isa = new InetSocketAddress((InetAddress)null, 80); in test_ConstructorLInetAddressI() 69 new InetSocketAddress(InetAddress.getByName("localhost"), 65536); in test_ConstructorLInetAddressI() 75 new InetSocketAddress(InetAddress.getByName("localhost"), -1); in test_ConstructorLInetAddressI() 82 InetSocketAddress isa = new InetSocketAddress(65535); in test_ConstructorI() 87 new InetSocketAddress(-1); in test_ConstructorI() 93 new InetSocketAddress(65536); in test_ConstructorI() [all …]
|
D | SocketTest.java | 27 import java.net.InetSocketAddress; 79 s.bind(new InetSocketAddress("localhost", 0)); in test_getLocalAddress_after_close() 115 InetSocketAddress listenAddr = new InetSocketAddress(host, 0); in checkSocketLocalAndRemoteAddresses() 125 InetSocketAddress addr = new InetSocketAddress(host, ssc.socket().getLocalPort()); in checkSocketLocalAndRemoteAddresses() 136 InetSocketAddress listenAddress = (InetSocketAddress) in.socket().getLocalSocketAddress(); in checkSocketLocalAndRemoteAddresses() 137 … InetSocketAddress outRemoteAddress = (InetSocketAddress) out.socket().getRemoteSocketAddress(); in checkSocketLocalAndRemoteAddresses() 138 … InetSocketAddress outLocalAddress = (InetSocketAddress) out.socket().getLocalSocketAddress(); in checkSocketLocalAndRemoteAddresses() 139 InetSocketAddress inLocalAddress = (InetSocketAddress) in.socket().getLocalSocketAddress(); in checkSocketLocalAndRemoteAddresses() 140 … InetSocketAddress inRemoteAddress = (InetSocketAddress) in.socket().getRemoteSocketAddress(); in checkSocketLocalAndRemoteAddresses() 183 InetSocketAddress inLocalAddressAfterClose = in checkSocketLocalAndRemoteAddresses() [all …]
|
D | ServerSocketTest.java | 21 import java.net.InetSocketAddress; 74 ss.bind(new InetSocketAddress(Inet4Address.getLocalHost(), 0)); in testStateAfterClose() 75 InetSocketAddress boundAddress = (InetSocketAddress) ss.getLocalSocketAddress(); in testStateAfterClose() 83 InetSocketAddress localAddressAfterClose = (InetSocketAddress) ss.getLocalSocketAddress(); in testStateAfterClose()
|
D | OldProxyTest.java | 18 import java.net.InetSocketAddress; 25 private SocketAddress address = new InetSocketAddress("127.0.0.1", 1234); 40 SocketAddress address1 = new InetSocketAddress("127.0.0.1", 1234); in test_hashCode() 52 SocketAddress address2 = new InetSocketAddress("127.0.0.1", 1235); in test_hashCode()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
D | InetSocketAddressTest.java | 19 import java.net.InetSocketAddress; 33 InetSocketAddress address = new InetSocketAddress("127.0.0.1", 0); in test_ConstructorLjava_lang_StringI() 49 InetSocketAddress isa = InetSocketAddress.createUnresolved( in test_createUnresolvedLjava_lang_StringI() 66 InetSocketAddress.createUnresolved( in test_createUnresolvedLjava_lang_StringI_IllegalArgumentException() 99 InetSocketAddress init = (InetSocketAddress) initial; 100 InetSocketAddress desr = (InetSocketAddress) deserialized; 114 InetSocketAddress.createUnresolved("badhost", 1000), // unresolved in testSerializationSelf() 115 new InetSocketAddress("Localhost", 1000) }; in testSerializationSelf() 126 InetSocketAddress.createUnresolved("badhost", 1000), // unresolved in testSerializationCompatibility() 127 new InetSocketAddress("Localhost", 1000) }; in testSerializationCompatibility()
|
D | SocketTest.java | 25 import java.net.InetSocketAddress; 51 InetSocketAddress addr = new InetSocketAddress(host, port); in run() 79 new InetSocketAddress(host, port).getAddress()); in run() 164 InetSocketAddress bogusAddress = new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddress() 176 theSocket.bind(new InetSocketAddress(InetAddress.getLocalHost(), 0)); in test_bindLjava_net_SocketAddress() 182 new InetSocketAddress(InetAddress.getLocalHost(), portNumber), in test_bindLjava_net_SocketAddress() 187 InetSocketAddress theAddress = new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddress() 192 InetSocketAddress boundAddress = new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddress() 199 new InetSocketAddress(InetAddress.getLocalHost(), portNumber), in test_bindLjava_net_SocketAddress() 217 theAddress = new InetSocketAddress(InetAddress.getLocalHost(), 0); in test_bindLjava_net_SocketAddress() [all …]
|
D | MulticastSocketTest.java | 26 import java.net.InetSocketAddress; 247 InetSocketAddress groupAddress = in test_joinGroupLjava_net_InetAddress() 248 new InetSocketAddress(group, receivingSocket.getLocalPort()); in test_joinGroupLjava_net_InetAddress() 280 mss.joinGroup(new InetSocketAddress(InetAddress.getByName("127.0.0.1"), 0), null); in test_joinGroup_non_multicast_address_IPv4() 293 mss.joinGroup(new InetSocketAddress(InetAddress.getByName("::1"), 0), null); in test_joinGroup_non_multicast_address_IPv6() 340 InetSocketAddress groupAddress = in test_joinGroupLjava_net_SocketAddressLjava_net_NetworkInterface() 341 new InetSocketAddress(group, receivingSocket.getLocalPort()); in test_joinGroupLjava_net_SocketAddressLjava_net_NetworkInterface() 365 groupAddress = new InetSocketAddress(group, receivingSocket.getLocalPort()); in test_joinGroupLjava_net_SocketAddressLjava_net_NetworkInterface() 370 InetSocketAddress group2Address = in test_joinGroupLjava_net_SocketAddressLjava_net_NetworkInterface() 371 new InetSocketAddress(group2, receivingSocket.getLocalPort()); in test_joinGroupLjava_net_SocketAddressLjava_net_NetworkInterface() [all …]
|
D | DatagramPacketTest.java | 24 import java.net.InetSocketAddress; 227 InetSocketAddress theAddress = new InetSocketAddress(InetAddress in test_Constructor$BILjava_net_SocketAddress() 233 new InetSocketAddress(thePacket.getAddress(), thePacket in test_Constructor$BILjava_net_SocketAddress() 268 InetSocketAddress theAddress = new InetSocketAddress(InetAddress in test_Constructor$BIILjava_net_SocketAddress() 274 new InetSocketAddress(thePacket.getAddress(), thePacket in test_Constructor$BIILjava_net_SocketAddress() 287 InetSocketAddress theAddress = new InetSocketAddress(InetAddress in test_getSocketAddress() 328 InetSocketAddress theAddress = new InetSocketAddress(InetAddress in test_setSocketAddressLjava_net_SocketAddress() 335 new InetSocketAddress(thePacket.getAddress(), thePacket in test_setSocketAddressLjava_net_SocketAddress()
|
D | DatagramSocketTest.java | 28 import java.net.InetSocketAddress; 528 InetSocketAddress addr = InetSocketAddress.createUnresolved( in testArchivedHarmonyRegressions() 617 new InetSocketAddress(InetAddress.getLocalHost(), 0))) { in test_ConstructorLjava_net_SocketAddress() 677 theSocket = new DatagramSocket(new InetSocketAddress(Inet6Address.LOOPBACK, 0)); in test_isBound() 687 theSocket.connect(new InetSocketAddress(Inet6Address.LOOPBACK, 0)); in test_isBound() 692 InetSocketAddress theLocalAddress = new InetSocketAddress(Inet6Address.LOOPBACK, 0); in test_isBound() 707 theSocket.connect(new InetSocketAddress(Inet6Address.LOOPBACK, ds.getPort())); in test_isConnected() 711 theSocket.connect(new InetSocketAddress(Inet6Address.LOOPBACK, ds.getPort())); in test_isConnected() 721 theSocket.connect(new InetSocketAddress(Inet6Address.LOOPBACK, ds.getPort())); in test_isConnected() 730 s.connect(new InetSocketAddress(Inet6Address.LOOPBACK, server.getPort())); in test_getRemoteSocketAddress() [all …]
|
D | ServerSocketTest.java | 34 import java.net.InetSocketAddress; 413 InetSocketAddress theAddress = new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddress() 421 + (new InetSocketAddress(InetAddress.getLocalHost(), in test_bindLjava_net_SocketAddress() 424 new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddress() 432 InetSocketAddress clAddress = new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddress() 452 theAddress = new InetSocketAddress(InetAddress.getLocalHost(), 0); in test_bindLjava_net_SocketAddress() 466 theSocket.bind(new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddress() 497 InetSocketAddress theAddress = new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddressI() 505 + (new InetSocketAddress(InetAddress.getLocalHost(), in test_bindLjava_net_SocketAddressI() 508 new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddressI() [all …]
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | ServerSocketChannelTest.java | 21 import java.net.InetSocketAddress; 72 ssc.socket().bind(new InetSocketAddress("unresolvedname", 31415)); in test_bind_unresolvedAddress() 86 InetSocketAddress boundAddress = (InetSocketAddress) ssc.socket().getLocalSocketAddress(); in test_bind_nullBindsToAll() 100 InetSocketAddress address = in test_bind_nullBindsToAll() 101 new InetSocketAddress(inetAddresses.nextElement(), boundAddress.getPort()); in test_bind_nullBindsToAll() 111 ssc.socket().bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); in test_bind_loopback() 112 InetSocketAddress boundAddress = (InetSocketAddress) ssc.socket().getLocalSocketAddress(); in test_bind_loopback() 120 InetSocketAddress loopbackAddress = in test_bind_loopback() 121 new InetSocketAddress(InetAddress.getLoopbackAddress(), boundAddress.getPort()); in test_bind_loopback() 131 InetSocketAddress address = in test_bind_loopback() [all …]
|
D | DatagramChannelTest.java | 27 import java.net.InetSocketAddress; 108 dc.socket().bind(new InetSocketAddress("unresolvedname", 31415)); in test_bind_unresolvedAddress() 129 dc.socket().bind(new InetSocketAddress(bindAddress, 0)); in test_bind_any() 134 InetSocketAddress actualAddress = (InetSocketAddress) dc.socket().getLocalSocketAddress(); in test_bind_any() 161 dc.socket().bind(new InetSocketAddress(bindAddress, 0)); in test_bind() 163 … InetSocketAddress actualAddress = (InetSocketAddress) dc.socket().getLocalSocketAddress(); in test_bind() 197 InetSocketAddress socketAddress = new InetSocketAddress(Inet4Address.LOOPBACK, 0); in test_bind() 201 ((InetSocketAddress)(channel.getLocalAddress())).getAddress()); in test_bind() 202 assertTrue(((InetSocketAddress)(channel.getLocalAddress())).getPort() > 0); in test_bind() 210 socketAddress = new InetSocketAddress(Inet4Address.LOOPBACK, in test_bind() [all …]
|
D | SocketChannelTest.java | 29 import java.net.InetSocketAddress; 87 sc.connect(new InetSocketAddress(InetAddress.getByAddress(new byte[] { in test_56684() 169 sc.socket().bind(new InetSocketAddress("unresolvedname", 31415)); in test_bind_unresolvedAddress() 190 InetSocketAddress bindAddr = new InetSocketAddress("localhost", 0); in test_bind_socketStateSync() 193 InetSocketAddress actualAddr = (InetSocketAddress) sc.socket().getLocalSocketAddress(); in test_bind_socketStateSync() 214 InetSocketAddress bindAddr = new InetSocketAddress("localhost", 0); in test_bind_socketObjectCreationAfterBind() 219 InetSocketAddress actualAddr = (InetSocketAddress) sc.socket().getLocalSocketAddress(); in test_bind_socketObjectCreationAfterBind() 309 InetSocketAddress socketAddress = new InetSocketAddress(Inet4Address.LOOPBACK, 0); in test_bind() 313 ((InetSocketAddress) (sc.getLocalAddress())).getAddress()); in test_bind() 314 assertTrue(((InetSocketAddress) (sc.getLocalAddress())).getPort() > 0); in test_bind() [all …]
|
D | AsynchronousServerSocketChannelTest.java | 23 import java.net.InetSocketAddress; 56 assc.bind(new InetSocketAddress(0)); in test_bind() 59 assc.bind(new InetSocketAddress(0)); in test_bind() 85 assc.bind(new InetSocketAddress("unresolvedname", 31415)); in test_bind_unresolvedAddress() 109 assc.bind(new InetSocketAddress(0)); in test_futureAccept() 131 assc.bind(new InetSocketAddress(0)); in test_completionHandlerAccept() 158 assc.bind(new InetSocketAddress(0)); in test_completionHandlerAccept_attachment() 195 assc.bind(new InetSocketAddress(0)); in test_completionHandlerAccept_npe() 237 assc.bind(new InetSocketAddress(0)); in test_group() 245 assc.bind(new InetSocketAddress(0)); in test_close() [all …]
|
D | DatagramChannelMulticastTest.java | 25 import java.net.InetSocketAddress; 236 InetSocketAddress localAddress = (InetSocketAddress) receiverChannel.getLocalAddress(); in check_joinAnySource() 358 InetSocketAddress localAddress = (InetSocketAddress) dc.getLocalAddress(); in test_joinAnySource_networkInterfaces() 448 InetSocketAddress localAddress = (InetSocketAddress) dc.getLocalAddress(); in check_joinAnySource_multicastLoopOption() 453 dc.send(sendBuffer, new InetSocketAddress(group, localAddress.getPort())); in check_joinAnySource_multicastLoopOption() 468 dc.send(sendBuffer2, new InetSocketAddress(group, localAddress.getPort())); in check_joinAnySource_multicastLoopOption() 770 sendingChannel.bind(new InetSocketAddress(senderBindAddress, 0)); in check_block_filtersAsExpected() 771 InetSocketAddress sendingAddress = (InetSocketAddress) sendingChannel.getLocalAddress(); in check_block_filtersAsExpected() 776 … new InetSocketAddress(receiverBindAddress, 0) /* local port left to the OS to determine */); in check_block_filtersAsExpected() 777 InetSocketAddress localReceivingAddress = in check_block_filtersAsExpected() [all …]
|
D | MembershipKeyTest.java | 25 import java.net.InetSocketAddress; 46 .bind(new InetSocketAddress(Inet4Address.ANY, PORT)); in init() 108 .bind(new InetSocketAddress(Inet4Address.LOOPBACK, 0)) in check_drop() 110 new InetSocketAddress(MULTICAST_ADDRESS, PORT))); in check_drop() 174 .bind(new InetSocketAddress(Inet4Address.LOOPBACK, 0)) in test_blockWithJoinWithoutSource() 176 new InetSocketAddress(MULTICAST_ADDRESS, PORT))); in test_blockWithJoinWithoutSource() 223 .bind(new InetSocketAddress(Inet4Address.LOOPBACK, 0)) in test_unblockWithJoinWithoutSource() 226 new InetSocketAddress(MULTICAST_ADDRESS, PORT))); in test_unblockWithJoinWithoutSource()
|
/libcore/ojluni/annotations/mmodule/java/net/ |
D | InetSocketAddress.annotated.java | 31 public class InetSocketAddress extends java.net.SocketAddress { class 34 public InetSocketAddress() { throw new RuntimeException("Stub!"); } in InetSocketAddress() method in InetSocketAddress 36 public InetSocketAddress(int port) { throw new RuntimeException("Stub!"); } in InetSocketAddress() method in InetSocketAddress 38 public InetSocketAddress(java.net.InetAddress addr, int port) { throw new RuntimeException("Stub!")… in InetSocketAddress() method in InetSocketAddress 40 public InetSocketAddress(java.lang.String hostname, int port) { throw new RuntimeException("Stub!")… in InetSocketAddress() method in InetSocketAddress 42 public static java.net.InetSocketAddress createUnresolved(java.lang.String host, int port) { throw … in createUnresolved()
|
/libcore/ojluni/annotations/hiddenapi/java/net/ |
D | InetSocketAddress.java | 32 public class InetSocketAddress extends java.net.SocketAddress { class 34 public InetSocketAddress() { in InetSocketAddress() method in InetSocketAddress 38 public InetSocketAddress(int port) { in InetSocketAddress() method in InetSocketAddress 42 public InetSocketAddress(java.net.InetAddress addr, int port) { in InetSocketAddress() method in InetSocketAddress 46 public InetSocketAddress(java.lang.String hostname, int port) { in InetSocketAddress() method in InetSocketAddress 50 private InetSocketAddress(int port, java.lang.String hostname) { in InetSocketAddress() method in InetSocketAddress 62 public static java.net.InetSocketAddress createUnresolved(java.lang.String host, int port) { in createUnresolved() 124 private final transient java.net.InetSocketAddress.InetSocketAddressHolder holder;
|
/libcore/ojluni/src/main/java/java/net/ |
D | InetSocketAddress.java | 53 public class InetSocketAddress class 158 public InetSocketAddress() { in InetSocketAddress() method in InetSocketAddress 176 public InetSocketAddress(int port) { in InetSocketAddress() method in InetSocketAddress 197 public InetSocketAddress(InetAddress addr, int port) { in InetSocketAddress() method in InetSocketAddress 230 public InetSocketAddress(String hostname, int port) { in InetSocketAddress() method in InetSocketAddress 243 private InetSocketAddress(int port, String hostname) { in InetSocketAddress() method in InetSocketAddress 268 public static InetSocketAddress createUnresolved(String host, int port) { in createUnresolved() 269 return new InetSocketAddress(checkPort(port), checkHost(host)); in createUnresolved() 326 InetSocketAddress.class.getDeclaredField("holder")); 420 if (obj == null || !(obj instanceof InetSocketAddress)) in equals() [all …]
|
D | MulticastSocket.java | 113 this(new InetSocketAddress(0)); in MulticastSocket() 138 this(new InetSocketAddress(port)); in MulticastSocket() 392 if (mcastaddr == null || !(mcastaddr instanceof InetSocketAddress)) in joinGroup() 398 checkAddress(((InetSocketAddress)mcastaddr).getAddress(), "joinGroup"); in joinGroup() 401 security.checkMulticast(((InetSocketAddress)mcastaddr).getAddress()); in joinGroup() 404 if (!((InetSocketAddress)mcastaddr).getAddress().isMulticastAddress()) { in joinGroup() 439 if (mcastaddr == null || !(mcastaddr instanceof InetSocketAddress)) in leaveGroup() 445 checkAddress(((InetSocketAddress)mcastaddr).getAddress(), "leaveGroup"); in leaveGroup() 448 security.checkMulticast(((InetSocketAddress)mcastaddr).getAddress()); in leaveGroup() 451 if (!((InetSocketAddress)mcastaddr).getAddress().isMulticastAddress()) { in leaveGroup()
|
D | DatagramSocket.java | 154 bind(new InetSocketAddress(0)); in connectInternal() 216 this(new InetSocketAddress(0)); in DatagramSocket() 319 this(new InetSocketAddress(laddr, port)); in DatagramSocket() 398 addr = new InetSocketAddress(0); in bind() 399 if (!(addr instanceof InetSocketAddress)) in bind() 401 InetSocketAddress epoint = (InetSocketAddress) addr; in bind() 512 if (!(addr instanceof InetSocketAddress)) in connect() 514 InetSocketAddress epoint = (InetSocketAddress) addr; in connect() 615 return new InetSocketAddress(getInetAddress(), getPort()); in getRemoteSocketAddress() 634 return new InetSocketAddress(getLocalAddress(), getLocalPort()); in getLocalSocketAddress() [all …]
|
D | Socket.java | 129 InetSocketAddress epoint = (InetSocketAddress) p.address(); in Socket() 135 epoint = new InetSocketAddress(epoint.getHostName(), epoint.getPort()); in Socket() 293 new InetSocketAddress(localAddr, localPort), true); in Socket() 335 new InetSocketAddress(localAddr, localPort), true); in Socket() 424 this(nonNullAddress(host), port, new InetSocketAddress(0), stream); in Socket() 445 InetSocketAddress address = new InetSocketAddress(addresses[i], port); in Socket() 603 if (!(endpoint instanceof InetSocketAddress)) in connect() 606 InetSocketAddress epoint = (InetSocketAddress) endpoint; in connect() 661 if (bindpoint != null && (!(bindpoint instanceof InetSocketAddress))) in bind() 663 InetSocketAddress epoint = (InetSocketAddress) bindpoint; in bind() [all …]
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | Net.java | 96 public static InetSocketAddress checkAddress(SocketAddress sa) { in checkAddress() 103 if (!(sa instanceof InetSocketAddress)) in checkAddress() 105 InetSocketAddress isa = (InetSocketAddress)sa; in checkAddress() 114 static InetSocketAddress asInetSocketAddress(SocketAddress sa) { in asInetSocketAddress() 115 if (!(sa instanceof InetSocketAddress)) in asInetSocketAddress() 117 return (InetSocketAddress)sa; in asInetSocketAddress() 178 static InetSocketAddress getRevealedLocalAddress(InetSocketAddress addr) { in getRevealedLocalAddress() 193 static String getRevealedLocalAddressAsString(InetSocketAddress addr) { in getRevealedLocalAddressAsString() 198 private static InetSocketAddress getLoopbackAddress(int port) { in getLoopbackAddress() 199 return new InetSocketAddress(InetAddress.getLoopbackAddress(), in getLoopbackAddress() [all …]
|
D | ServerSocketChannelImpl.java | 75 private InetSocketAddress localAddress; // null => unbound 204 public InetSocketAddress localAddress() { in localAddress() 217 InetSocketAddress isa = (local == null) ? new InetSocketAddress(0) : in bind() 242 InetSocketAddress[] isaa = new InetSocketAddress[1]; in accept() 265 InetSocketAddress isa = isaa[0]; in accept() 401 InetSocketAddress addr = localAddress(); in toString() 419 InetSocketAddress[] isaa) in accept() 433 InetSocketAddress[] isaa) in accept0()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
D | ServerSocketChannelTest.java | 23 import java.net.InetSocketAddress; 121 … InetSocketAddress localAddress = (InetSocketAddress) ssc.socket().getLocalSocketAddress(); in test_bind_null() 163 …InetSocketAddress address = (InetSocketAddress) portPickingChannel.socket().getLocalSocketAddress(… in test_bind_explicitPort() 170 InetSocketAddress bindAddress = new InetSocketAddress("localhost", address.getPort()); in test_bind_explicitPort() 173 InetSocketAddress boundAddress = (InetSocketAddress) ssc.socket().getLocalSocketAddress(); in test_bind_explicitPort() 188 InetSocketAddress bindAddr = new InetSocketAddress("localhost", 0); in test_bind_socketSync() 191 InetSocketAddress actualAddr = (InetSocketAddress) ssc.socket().getLocalSocketAddress(); in test_bind_socketSync() 207 InetSocketAddress bindAddr = new InetSocketAddress("localhost", 0); in test_bind_socketSyncAfterBind() 212 InetSocketAddress actualAddr = (InetSocketAddress) ssc.socket().getLocalSocketAddress(); in test_bind_socketSyncAfterBind() 232 InetSocketAddress bindAddr = new InetSocketAddress("localhost", 0); in test_getLocalSocketAddress_afterClose() [all …]
|