/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 | 25 import java.net.InetSocketAddress; 56 s.bind(new InetSocketAddress("localhost", 0)); in test_getLocalAddress_after_close() 92 InetSocketAddress listenAddr = new InetSocketAddress(host, 0); in checkSocketLocalAndRemoteAddresses() 102 InetSocketAddress addr = new InetSocketAddress(host, ssc.socket().getLocalPort()); in checkSocketLocalAndRemoteAddresses() 113 InetSocketAddress listenAddress = (InetSocketAddress) in.socket().getLocalSocketAddress(); in checkSocketLocalAndRemoteAddresses() 114 … InetSocketAddress outRemoteAddress = (InetSocketAddress) out.socket().getRemoteSocketAddress(); in checkSocketLocalAndRemoteAddresses() 115 … InetSocketAddress outLocalAddress = (InetSocketAddress) out.socket().getLocalSocketAddress(); in checkSocketLocalAndRemoteAddresses() 116 InetSocketAddress inLocalAddress = (InetSocketAddress) in.socket().getLocalSocketAddress(); in checkSocketLocalAndRemoteAddresses() 117 … InetSocketAddress inRemoteAddress = (InetSocketAddress) in.socket().getRemoteSocketAddress(); in checkSocketLocalAndRemoteAddresses() 160 InetSocketAddress inLocalAddressAfterClose = in checkSocketLocalAndRemoteAddresses() [all …]
|
D | ServerSocketTest.java | 21 import java.net.InetSocketAddress; 66 ss.bind(new InetSocketAddress(Inet4Address.getLocalHost(), 0)); in testStateAfterClose() 67 InetSocketAddress boundAddress = (InetSocketAddress) ss.getLocalSocketAddress(); in testStateAfterClose() 75 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()
|
D | DatagramSocketTest.java | 22 import java.net.InetSocketAddress; 35 InetSocketAddress socketAddress = (InetSocketAddress) ds.getLocalSocketAddress(); in testInitialState()
|
D | OldSocketTest.java | 28 import java.net.InetSocketAddress; 254 s.bind(new InetSocketAddress(InetAddress.getByName("0.0.0.0"), 0)); in test_getLocalAddress() 662 assertEquals(new InetSocketAddress(InetAddress.getLocalHost(), s.getLocalPort()), in test_getLocalSocketAddress() 674 theSocket.bind(new InetSocketAddress(InetAddress.getLocalHost(), 0)); in test_getLocalSocketAddress() 675 assertEquals(new InetSocketAddress(InetAddress.getLocalHost(), theSocket.getLocalPort()), in test_getLocalSocketAddress() 681 s.bind(new InetSocketAddress(InetAddress.getByName("0.0.0.0"), 0)); in test_getLocalSocketAddress() 684 … ((InetSocketAddress) s.getLocalSocketAddress()).getAddress() instanceof Inet6Address); in test_getLocalSocketAddress() 689 s.bind(new InetSocketAddress(InetAddress.getByName("0.0.0.0"), 0)); in test_getLocalSocketAddress() 691 … ((InetSocketAddress) s.getLocalSocketAddress()).getAddress() instanceof Inet6Address); in test_getLocalSocketAddress() 704 new InetSocketAddress(InetAddress in test_getRemoteSocketAddress() [all …]
|
/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 | 27 import java.net.InetSocketAddress; 49 InetSocketAddress addr = new InetSocketAddress(host, port); in run() 77 new InetSocketAddress(host, port).getAddress()); in run() 162 InetSocketAddress bogusAddress = new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddress() 174 theSocket.bind(new InetSocketAddress(InetAddress.getLocalHost(), 0)); in test_bindLjava_net_SocketAddress() 180 new InetSocketAddress(InetAddress.getLocalHost(), portNumber), in test_bindLjava_net_SocketAddress() 185 InetSocketAddress theAddress = new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddress() 190 InetSocketAddress boundAddress = new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddress() 197 new InetSocketAddress(InetAddress.getLocalHost(), portNumber), in test_bindLjava_net_SocketAddress() 215 theAddress = new InetSocketAddress(InetAddress.getLocalHost(), 0); in test_bindLjava_net_SocketAddress() [all …]
|
D | MulticastSocketTest.java | 26 import java.net.InetSocketAddress; 241 InetSocketAddress groupAddress = in test_joinGroupLjava_net_InetAddress() 242 new InetSocketAddress(group, receivingSocket.getLocalPort()); in test_joinGroupLjava_net_InetAddress() 274 mss.joinGroup(new InetSocketAddress(InetAddress.getByName("127.0.0.1"), 0), null); in test_joinGroup_non_multicast_address_IPv4() 287 mss.joinGroup(new InetSocketAddress(InetAddress.getByName("::1"), 0), null); in test_joinGroup_non_multicast_address_IPv6() 317 SocketAddress groupSockAddr = new InetSocketAddress(group, sendingSocket.getLocalPort()); in test_joinGroupLjava_net_SocketAddressLjava_net_NetworkInterface() 322 InetSocketAddress groupAddress = in test_joinGroupLjava_net_SocketAddressLjava_net_NetworkInterface() 323 new InetSocketAddress(group, receivingSocket.getLocalPort()); in test_joinGroupLjava_net_SocketAddressLjava_net_NetworkInterface() 338 groupAddress = new InetSocketAddress(group, receivingSocket.getLocalPort()); in test_joinGroupLjava_net_SocketAddressLjava_net_NetworkInterface() 344 InetSocketAddress group2Address = 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; 505 InetSocketAddress addr = InetSocketAddress.createUnresolved( in testArchivedHarmonyRegressions() 593 DatagramSocket ds = new DatagramSocket(new InetSocketAddress( in test_ConstructorLjava_net_SocketAddress() 652 theSocket = new DatagramSocket(new InetSocketAddress(Inet6Address.LOOPBACK, 0)); in test_isBound() 662 theSocket.connect(new InetSocketAddress(Inet6Address.LOOPBACK, 0)); in test_isBound() 667 InetSocketAddress theLocalAddress = new InetSocketAddress(Inet6Address.LOOPBACK, 0); in test_isBound() 682 theSocket.connect(new InetSocketAddress(Inet6Address.LOOPBACK, ds.getPort())); in test_isConnected() 686 theSocket.connect(new InetSocketAddress(Inet6Address.LOOPBACK, ds.getPort())); in test_isConnected() 696 theSocket.connect(new InetSocketAddress(Inet6Address.LOOPBACK, ds.getPort())); in test_isConnected() 704 s.connect(new InetSocketAddress(Inet6Address.LOOPBACK, server.getPort())); in test_getRemoteSocketAddress() [all …]
|
D | ServerSocketTest.java | 28 import java.net.InetSocketAddress; 384 InetSocketAddress theAddress = new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddress() 392 + (new InetSocketAddress(InetAddress.getLocalHost(), in test_bindLjava_net_SocketAddress() 395 new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddress() 403 InetSocketAddress clAddress = new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddress() 423 theAddress = new InetSocketAddress(InetAddress.getLocalHost(), 0); in test_bindLjava_net_SocketAddress() 437 theSocket.bind(new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddress() 468 InetSocketAddress theAddress = new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddressI() 476 + (new InetSocketAddress(InetAddress.getLocalHost(), in test_bindLjava_net_SocketAddressI() 479 new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddressI() [all …]
|
/libcore/luni/src/main/java/java/net/ |
D | InetSocketAddress.java | 27 public class InetSocketAddress extends SocketAddress { class 39 public InetSocketAddress() { in InetSocketAddress() method in InetSocketAddress 54 public InetSocketAddress(int port) { in InetSocketAddress() method in InetSocketAddress 69 public InetSocketAddress(InetAddress address, int port) { in InetSocketAddress() method in InetSocketAddress 89 public InetSocketAddress(String host, int port) { in InetSocketAddress() method in InetSocketAddress 97 InetSocketAddress(String hostname, int port, boolean needResolved) { in InetSocketAddress() method in InetSocketAddress 129 public static InetSocketAddress createUnresolved(String host, int port) { in createUnresolved() 130 return new InetSocketAddress(host, port, false); in createUnresolved() 199 if (!(socketAddr instanceof InetSocketAddress)) { in equals() 202 InetSocketAddress iSockAddr = (InetSocketAddress) socketAddr; in equals()
|
D | DatagramSocket.java | 417 if (!(localAddr instanceof InetSocketAddress)) { in DatagramSocket() 421 checkPort(((InetSocketAddress) localAddr).getPort()); in DatagramSocket() 472 if (!(localAddr instanceof InetSocketAddress)) { in bind() 476 InetSocketAddress inetAddr = (InetSocketAddress) localAddr; in bind() 511 if (!(peer instanceof InetSocketAddress)) { in connect() 515 InetSocketAddress isa = (InetSocketAddress) peer; in connect() 558 connect(new InetSocketAddress(address, port)); in connect() 587 return new InetSocketAddress(getInetAddress(), getPort()); in getRemoteSocketAddress() 598 return new InetSocketAddress(getLocalAddress(), getLocalPort()); in getLocalSocketAddress()
|
D | DatagramPacket.java | 299 return new InetSocketAddress(getAddress(), getPort()); in getSocketAddress() 309 if (!(sockAddr instanceof InetSocketAddress)) { in setSocketAddress() 313 InetSocketAddress inetAddr = (InetSocketAddress) sockAddr; in setSocketAddress()
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | ServerSocketChannelTest.java | 21 import java.net.InetSocketAddress; 69 ssc.socket().bind(new InetSocketAddress("unresolvedname", 31415)); in test_bind_unresolvedAddress() 83 InetSocketAddress boundAddress = (InetSocketAddress) ssc.socket().getLocalSocketAddress(); in test_bind_nullBindsToAll() 97 InetSocketAddress address = in test_bind_nullBindsToAll() 98 new InetSocketAddress(inetAddresses.nextElement(), boundAddress.getPort()); in test_bind_nullBindsToAll() 108 ssc.socket().bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); in test_bind_loopback() 109 InetSocketAddress boundAddress = (InetSocketAddress) ssc.socket().getLocalSocketAddress(); in test_bind_loopback() 117 InetSocketAddress loopbackAddress = in test_bind_loopback() 118 new InetSocketAddress(InetAddress.getLoopbackAddress(), boundAddress.getPort()); in test_bind_loopback() 128 InetSocketAddress address = in test_bind_loopback() [all …]
|
D | DatagramChannelTest.java | 24 import java.net.InetSocketAddress; 94 dc.socket().bind(new InetSocketAddress("unresolvedname", 31415)); in test_bind_unresolvedAddress() 115 dc.socket().bind(new InetSocketAddress(bindAddress, 0)); in test_bind_any() 120 InetSocketAddress actualAddress = (InetSocketAddress) dc.socket().getLocalSocketAddress(); in test_bind_any() 147 dc.socket().bind(new InetSocketAddress(bindAddress, 0)); in test_bind() 149 InetSocketAddress actualAddress = (InetSocketAddress) dc.socket().getLocalSocketAddress(); in test_bind()
|
D | SocketChannelTest.java | 25 import java.net.InetSocketAddress; 86 sc.connect(new InetSocketAddress(InetAddress.getByAddress(new byte[] { 0, 0, 0, 0 }), 0)); in test_56684() 167 sc.socket().bind(new InetSocketAddress("unresolvedname", 31415)); in test_bind_unresolvedAddress() 188 InetSocketAddress bindAddr = new InetSocketAddress("localhost", 0); in test_bind_socketStateSync() 191 InetSocketAddress actualAddr = (InetSocketAddress) sc.socket().getLocalSocketAddress(); in test_bind_socketStateSync() 212 InetSocketAddress bindAddr = new InetSocketAddress("localhost", 0); in test_bind_socketObjectCreationAfterBind() 217 InetSocketAddress actualAddr = (InetSocketAddress) sc.socket().getLocalSocketAddress(); in test_bind_socketObjectCreationAfterBind()
|
/libcore/support/src/test/java/tests/net/ |
D | StuckServer.java | 21 import java.net.InetSocketAddress; 33 private InetSocketAddress address; 47 this.address = (InetSocketAddress) serverSocket.getLocalSocketAddress(); in StuckServer() 65 this.address = new InetSocketAddress(testNet1, 80); in StuckServer() 69 public InetSocketAddress getLocalSocketAddress() { in getLocalSocketAddress()
|
/libcore/luni/src/test/java/libcore/io/ |
D | OsTest.java | 25 import java.net.InetSocketAddress; 70 InetSocketAddress peerAddress = new InetSocketAddress(); in checkUnixDomainSocket() 116 InetSocketAddress isa = (InetSocketAddress) Libcore.os.getsockname(fd); in checkSockName() 125 InetSocketAddress isa = (InetSocketAddress) sa; in checkNoName() 204 InetSocketAddress address = (InetSocketAddress) Libcore.os.getsockname(serverFd); in test_byteBufferPositions_sendto_recvfrom() 209 InetSocketAddress peerAddress = new InetSocketAddress(); in test_byteBufferPositions_sendto_recvfrom()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
D | DatagramChannelTest.java | 24 import java.net.InetSocketAddress; 56 private InetSocketAddress datagramSocket1Address; 57 private InetSocketAddress datagramSocket2Address; 59 private InetSocketAddress channel1Address; 60 private InetSocketAddress channel2Address; 74 channel1.socket().bind(new InetSocketAddress(Inet6Address.LOOPBACK, 0)); in setUp() 75 channel2.socket().bind(new InetSocketAddress(Inet6Address.LOOPBACK, 0)); in setUp() 77 channel1Address = (InetSocketAddress) channel1.socket().getLocalSocketAddress(); in setUp() 78 channel2Address = (InetSocketAddress) channel2.socket().getLocalSocketAddress(); in setUp() 83 datagramSocket1Address = (InetSocketAddress) datagramSocket1.getLocalSocketAddress(); in setUp() [all …]
|
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 …]
|
/libcore/luni/src/main/java/java/nio/ |
D | SocketChannelImpl.java | 30 import java.net.InetSocketAddress; 77 private InetSocketAddress connectAddress = null; 156 InetSocketAddress localSocketAddress = (InetSocketAddress) sa; in onBind() 180 InetSocketAddress inetSocketAddress = validateAddress(socketAddress); in connect() 237 void onConnectStatusChanged(InetSocketAddress address, int status, boolean updateSocketState) { in onConnectStatusChanged() 444 static InetSocketAddress validateAddress(SocketAddress socketAddress) { in validateAddress() 448 if (!(socketAddress instanceof InetSocketAddress)) { in validateAddress() 451 InetSocketAddress inetSocketAddress = (InetSocketAddress) socketAddress; in validateAddress() 486 public void onAccept(InetSocketAddress remoteAddress, boolean updateSocketState) { in onAccept() 534 InetSocketAddress remoteInetAddress = (InetSocketAddress) remoteAddr; in connect()
|
D | DatagramChannelImpl.java | 30 import java.net.InetSocketAddress; 61 InetSocketAddress connectAddress; 93 connectAddress = new InetSocketAddress(0); in DatagramChannelImpl() 125 InetSocketAddress localSocketAddress = (InetSocketAddress) sa; in onBind() 148 InetSocketAddress inetSocketAddress = SocketChannelImpl.validateAddress(address); in connect() 178 connectAddress = new InetSocketAddress(remoteAddress, remotePort); in onConnect() 292 InetSocketAddress isa = (InetSocketAddress) socketAddress; in send() 555 InetSocketAddress inetSocketAddress = (InetSocketAddress) peer; in connect() 566 connect(new InetSocketAddress(address, port)); in connect()
|
/libcore/luni/src/test/java/libcore/javax/net/ |
D | ServerSocketFactoryTest.java | 23 import java.net.InetSocketAddress; 36 serverSocket.bind(new InetSocketAddress(0)); in testCreateServerSocket() 76 assertBacklog(specifiedBacklog, new InetSocketAddress( in testSocket() 91 private void assertBacklog(int specifiedBacklog, InetSocketAddress serverAddress) in assertBacklog()
|