/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
D | URLTest.java | 72 assertEquals("u returns a wrong port", 8080, u.getPort()); in test_ConstructorLjava_lang_String() 81 assertEquals("u1 returns a wrong port", 9999, u1.getPort()); in test_ConstructorLjava_lang_String() 90 assertEquals("u2 returns a wrong port", -1, u2.getPort()); in test_ConstructorLjava_lang_String() 100 assertEquals("u2a returns a wrong port", -1, u2a.getPort()); in test_ConstructorLjava_lang_String() 109 assertEquals("u3 returns a wrong port", -1, u3.getPort()); in test_ConstructorLjava_lang_String() 118 assertEquals("u3a returns a wrong port", -1, u3a.getPort()); in test_ConstructorLjava_lang_String() 127 assertEquals("u3b returns a wrong port", -1, u3b.getPort()); in test_ConstructorLjava_lang_String() 136 assertEquals("u4 returns a wrong port", -1, u4.getPort()); in test_ConstructorLjava_lang_String() 144 assertEquals("u5 returns a wrong port", -1, u5.getPort()); in test_ConstructorLjava_lang_String() 151 assertEquals("u5a returns a wrong port", -1, u5a.getPort()); in test_ConstructorLjava_lang_String() [all …]
|
D | DatagramPacketTest.java | 44 assertEquals(-1, dp.getPort()); in test_Constructor$BI() 72 assertEquals("Wrong port", 0, dp.getPort()); in test_Constructor$BIILjava_net_InetAddressI() 86 assertEquals("Wrong port", 0, dp.getPort()); in test_Constructor$BILjava_net_InetAddressI() 131 assertEquals("Incorrect port returned", 1000, dp.getPort()); in test_getPort() 143 assertTrue("datagram received wrong port: " + packet.getPort(), packet in test_getPort() 144 .getPort() == port); in test_getPort() 194 assertEquals("Port not set", 2000, dp.getPort()); in test_setPortI() 234 .getPort())); in test_Constructor$BILjava_net_SocketAddress() 275 .getPort())); in test_Constructor$BIILjava_net_SocketAddress() 336 .getPort())); in test_setSocketAddressLjava_net_SocketAddress()
|
D | DatagramSocketTest.java | 86 public int getPort() { in getPort() method in DatagramSocketTest.DatagramServer 154 assertEquals("Incorrect Port", 0, ds.getPort()); in test_connectLjava_net_InetAddressI() 208 ds.connect(Inet6Address.LOOPBACK, server.getPort()); in testConnect_echoServer() 230 ds.connect(Inet6Address.LOOPBACK, s1.getPort()); in testConnect_throwsOnAddressMismatch() 232 ds.send(new DatagramPacket(new byte[10], 10, Inet6Address.LOOPBACK, s2.getPort())); in testConnect_throwsOnAddressMismatch() 248 final int serverPortNumber = server.getPort(); in testConnect_connectDisconnectConnectThenSendRecv() 249 ds.connect(Inet6Address.LOOPBACK, broken.getPort()); in testConnect_connectDisconnectConnectThenSendRecv() 271 final int serverPortNumber = server.getPort(); in testConnect_connectDisconnectThenSendRecv() 295 final int serverPortNumber = server.getPort(); in testConnect_connectTwice() 296 ds.connect(Inet6Address.LOOPBACK, broken.getPort()); in testConnect_connectTwice() [all …]
|
D | InetSocketAddressTest.java | 54 assertEquals(isa.getPort(), legalHostPortPairs[i].port); in test_createUnresolvedLjava_lang_StringI() 103 assertEquals("Port", init.getPort(), desr.getPort());
|
/libcore/luni/src/test/java/tests/security/cert/ |
D | LDAPCertStoreParametersTest.java | 60 assertEquals("port", 389, cp.getPort()); in testLDAPCertStoreParameters02() 83 assertEquals("port", 389, cp.getPort()); in testLDAPCertStoreParametersString02() 121 assertTrue("port", cp.getPort() == portNumber); in testLDAPCertStoreParametersStringint02() 159 assertTrue("portsTheSame", cp1.getPort() == cp2.getPort()); in testClone() 181 assertTrue(cp.getPort() == portNumber); in testGetPort()
|
/libcore/ojluni/src/main/java/java/net/ |
D | SocksSocketImpl.java | 70 serverPort = ad.getPort(); in SocksSocketImpl() 269 out.write((endpoint.getPort() >> 8) & 0xff); in connectV4() 270 out.write((endpoint.getPort() >> 0) & 0xff); in connectV4() 344 epoint.getPort()); in connect() 347 epoint.getPort()); in connect() 495 out.write((epoint.getPort() >> 8) & 0xff); in connect() 496 out.write((epoint.getPort() >> 0) & 0xff); in connect() 500 out.write((epoint.getPort() >> 8) & 0xff); in connect() 501 out.write((epoint.getPort() >> 0) & 0xff); in connect() 505 out.write((epoint.getPort() >> 8) & 0xff); in connect() [all …]
|
D | DatagramPacket.java | 218 public synchronized int getPort() { in getPort() method in DatagramPacket 344 setPort(addr.getPort()); in setSocketAddress() 356 return new InetSocketAddress(getAddress(), getPort()); in getSocketAddress()
|
D | Socket.java | 135 epoint = new InetSocketAddress(epoint.getHostName(), epoint.getPort()); in Socket() 137 security.checkConnect(epoint.getHostName(), epoint.getPort()); in Socket() 140 epoint.getPort()); in Socket() 608 int port = epoint.getPort(); in connect() 670 int port = epoint.getPort(); in bind() 776 public int getPort() { in getPort() method in Socket 780 return getImpl().getPort(); in getPort() 828 return new InetSocketAddress(getInetAddress(), getPort()); in getRemoteSocketAddress() 1614 ",port=" + getImpl().getPort() + in toString()
|
D | PlainDatagramSocketImpl.java | 110 localPort = IoBridge.getLocalInetSocketAddress(fd).getPort(); in bind0() 124 int port = connected ? 0 : p.getPort(); in send() 133 return p.getPort(); in peek() 138 return p.getPort(); in peekData()
|
D | URLStreamHandler.java | 128 int port = u.getPort(); in parseURL() 419 u.getPort()); in hashCode() 447 port1 = (u1.getPort() != -1) ? u1.getPort() : u1.handler.getDefaultPort(); in sameFile() 448 port2 = (u2.getPort() != -1) ? u2.getPort() : u2.handler.getDefaultPort(); in sameFile()
|
D | DatagramSocket.java | 405 int port = epoint.getPort(); in bind() 517 connectInternal(epoint.getAddress(), epoint.getPort()); in connect() 592 public int getPort() { in getPort() method in DatagramSocket 615 return new InetSocketAddress(getInetAddress(), getPort()); in getRemoteSocketAddress() 701 p.getPort()); in send() 711 p.getPort() != connectedPort) { in send()
|
D | PlainSocketImpl.java | 152 localport = IoBridge.getLocalInetSocketAddress(fd).getPort(); in socketConnect() 168 localport = IoBridge.getLocalInetSocketAddress(fd).getPort(); in socketBind() 206 s.port = peerAddress.getPort(); in socketAccept() 218 s.localport = IoBridge.getLocalInetSocketAddress(s.fd).getPort(); in socketAccept()
|
D | InetSocketAddress.java | 71 private int getPort() { in getPort() method in InetSocketAddress.InetSocketAddressHolder 338 public final int getPort() { in getPort() method in InetSocketAddress 339 return holder.getPort(); in getPort()
|
/libcore/luni/src/test/java/libcore/libcore/net/ |
D | NetworkSecurityPolicyTest.java | 100 URL url = new URL("http://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithHttpURLConnection() 113 URL url = new URL("http://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithHttpURLConnection() 128 URL url = new URL("ftp://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithFtpURLConnection() 141 URL url = new URL("ftp://localhost:" + server.getPort() + "/test.txt"); in testCleartextTrafficPolicyWithFtpURLConnection() 155 URL url = new URL("jar:http://localhost:" + server.getPort() + "/test.jar!/"); in testCleartextTrafficPolicyWithJarHttpURLConnection() 168 URL url = new URL("jar:http://localhost:" + server.getPort() + "/test.jar!/"); in testCleartextTrafficPolicyWithJarHttpURLConnection() 183 URL url = new URL("jar:ftp://localhost:" + server.getPort() + "/test.jar!/"); in testCleartextTrafficPolicyWithJarFtpURLConnection() 196 URL url = new URL("jar:ftp://localhost:" + server.getPort() + "/test.jar!/"); in testCleartextTrafficPolicyWithJarFtpURLConnection() 210 SocketHandler logger = new SocketHandler("localhost", server.getPort()); in testCleartextTrafficPolicyWithLoggingSocketHandler() 226 new SocketHandler("localhost", server.getPort()); in testCleartextTrafficPolicyWithLoggingSocketHandler() [all …]
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | DatagramChannelTest.java | 95 assertEquals(-1, socket.getPort()); in testInitialState() 136 assertTrue(actualAddress.getPort() > 0); in test_bind_any() 165 assertTrue(actualAddress.getPort() > 0); in test_bind() 202 assertTrue(((InetSocketAddress)(channel.getLocalAddress())).getPort() > 0); in test_bind() 211 ((InetSocketAddress)(channel.getLocalAddress())).getPort()); in test_bind() 236 assertEquals(((InetSocketAddress) (serverChannel.getLocalAddress())).getPort(), in test_getRemoteAddress() 237 ((InetSocketAddress) (clientChannel.getRemoteAddress())).getPort()); in test_getRemoteAddress()
|
D | ServerSocketChannelTest.java | 114 new InetSocketAddress(inetAddresses.nextElement(), boundAddress.getPort()); in bind_nullBindsToAll() 180 new InetSocketAddress(InetAddress.getLoopbackAddress(), boundAddress.getPort()); in bind_loopback() 198 new InetSocketAddress(inetAddresses.nextElement(), boundAddress.getPort()); in bind_loopback() 217 assertTrue(((InetSocketAddress)(ssc.getLocalAddress())).getPort() > 0); in bind_socketAddress() 221 ((InetSocketAddress)(ssc.getLocalAddress())).getPort())); in bind_socketAddress()
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | SocketTest.java | 147 assertEquals(outRemoteAddress.getPort(), ss.getLocalPort()); in checkSocketLocalAndRemoteAddresses() 148 assertEquals(inLocalAddress.getPort(), ss.getLocalPort()); in checkSocketLocalAndRemoteAddresses() 149 assertEquals(inRemoteAddress.getPort(), outLocalAddress.getPort()); in checkSocketLocalAndRemoteAddresses() 186 assertEquals(inLocalAddress.getPort(), inLocalAddressAfterClose.getPort()); in checkSocketLocalAndRemoteAddresses() 191 assertEquals(outLocalAddress.getPort(), outLocalAddressAfterClose.getPort()); in checkSocketLocalAndRemoteAddresses() 362 assertEquals(0, s.getPort()); in testInitialState() 381 assertEquals(boundAddress.getPort(), s.getLocalPort()); in testStateAfterClose() 385 assertEquals(boundAddress.getPort(), localAddressAfterClose.getPort()); in testStateAfterClose()
|
D | URITest.java | 34 assertEquals(8080, uri.getPort()); in testUriParts() 160 assertEquals(8080, uri.getPort()); in testUserNoPasswordExplicitPort() 168 assertEquals(8080, uri.getPort()); in testUserPasswordHostPort() 177 assertEquals(-1, uri.getPort()); in testUserPasswordEmptyHostPort() 186 assertEquals(-1, uri.getPort()); in testUserPasswordEmptyHostEmptyPort() 256 assertEquals(-1, uri.getPort()); in testColonInFragment() 277 assertEquals(-1, uri.getPort()); in testEmptyPort() 284 assertEquals(-1, uri.getPort()); in testNonNumericPort() 291 assertEquals(-1, uri.getPort()); in testNegativePort() 298 assertEquals(-1, uri.getPort()); in testNegativePortEqualsPlaceholder() [all …]
|
D | OldURLTest.java | 72 assertEquals("Assert 2: wrong port", -1, testURL.getPort()); in test_ConstructorLjava_lang_StringLjava_lang_StringLjava_lang_String() 156 assertEquals("Assert 2: wrong port", -1, testURL.getPort()); in testURLString() 431 assertEquals(-1,testFTPURL.getPort()); in testGetPort() 432 assertEquals(-1,testHTTPURL.getPort()); in testGetPort() 435 assertEquals(8082, testHTTPURL8082.getPort()); in testGetPort() 660 assertEquals("SSISH1 returns a wrong port", 8080, u.getPort()); in test_ConstructorLjava_lang_StringLjava_lang_StringILjava_lang_StringLjava_net_URLStreamHandler() 670 assertEquals("SSISH2 returns a wrong port", 8080, u.getPort()); in test_ConstructorLjava_lang_StringLjava_lang_StringILjava_lang_StringLjava_net_URLStreamHandler() 734 assertEquals("1 returns a wrong port", -1, u1.getPort()); in testURLURLStringURLStreamHandler() 742 assertEquals("2 returns a wrong port", -1, u1.getPort()); in testURLURLStringURLStreamHandler() 750 assertEquals("3 returns a wrong port", -1, u1.getPort()); in testURLURLStringURLStreamHandler()
|
D | OldDatagramPacketTest.java | 29 assertEquals("Incorrect port returned", 1000, dp.getPort()); in test_getPort() 54 assertEquals(packet.getPort(), ss.getLocalPort()); in test_getPort()
|
D | URLTest.java | 50 assertEquals(8080, url.getPort()); in testUrlParts() 61 assertEquals(80, url.getPort()); in testExplicitPort() 264 asList(url.getProtocol(), url.getHost(), url.getPort(), url.getAuthority(), in assertFields() 309 assertEquals(-1, url.getPort()); in testNoHost() 330 assertEquals(-1, url.getPort()); in testEmptyHostAndNoPath() 344 assertEquals(-1, url.getPort()); in testNoHostAndNoPath() 372 assertEquals(8080, url.getPort()); in testUserNoPasswordExplicitPort() 380 assertEquals(8080, url.getPort()); in testUserPasswordHostPort() 388 assertEquals(8080, url.getPort()); in testUserPasswordEmptyHostPort() 396 assertEquals(-1, url.getPort()); in testUserPasswordEmptyHostEmptyPort() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ |
D | SocketFactoryTest.java | 48 assertEquals(0, s.getPort()); in test_createSocket() 65 assertTrue("Failed to create socket", s.getPort() == sport); in test_createSocket_StringI() 102 assertTrue("Failed to create socket", s.getPort() == sport); in test_createSocket_InetAddressI() 133 assertTrue("1: Failed to create socket", s.getPort() == sport); in test_createSocket_InetAddressIInetAddressI() 220 assertTrue("1: Failed to create socket", s.getPort() == sport); in test_createSocket_05()
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | DatagramSocketAdaptor.java | 73 int port = isa.getPort(); in connectInternal() 133 public int getPort() { in getPort() method in DatagramSocketAdaptor 135 ? Net.asInetSocketAddress(dc.remoteAddress()).getPort() in getPort() 154 p.setPort(isa.getPort()); in send() 250 return ((InetSocketAddress)local).getPort(); in getLocalPort()
|
D | AsynchronousServerSocketChannelImpl.java | 154 sm.checkListen(isa.getPort()); in bind() 161 NetHooks.beforeTcpBind(fd, isa.getAddress(), isa.getPort()); in bind() 162 Net.bind(fd, isa.getAddress(), isa.getPort()); in bind()
|
/libcore/ojluni/annotations/hiddenapi/java/net/ |
D | InetSocketAddress.java | 79 public final int getPort() { in getPort() method in InetSocketAddress 146 private int getPort() { in getPort() method in InetSocketAddress.InetSocketAddressHolder
|