Home
last modified time | relevance | path

Searched refs:getLocalPort (Results 1 – 25 of 60) sorted by relevance

123

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DSocketTest.java80 port = socket.getLocalPort(); in run()
85 port = socket.getLocalPort(); in run()
177 int portNumber = theSocket.getLocalPort(); in test_bindLjava_net_SocketAddress()
191 int sport = server.getLocalPort(); in test_bindLjava_net_SocketAddress()
255 assertTrue(0 != socket.getLocalPort()); in test_bindLjava_net_SocketAddress_Proxy()
262 Socket client = new Socket(InetAddress.getLocalHost(), server.getLocalPort()); in test_close()
345 .getLocalHost(), server.getLocalPort()); in test_connectLjava_net_SocketAddress()
356 assertTrue("Local port was 0", client.getLocalPort() != 0); in test_connectLjava_net_SocketAddress()
365 .getLocalPort()); in test_connectLjava_net_SocketAddress()
446 .getLocalHost(), server.getLocalPort()); in test_connectLjava_net_SocketAddressI()
[all …]
DServerSocketTest.java136 startClient(s.getLocalPort()); in test_ConstructorII()
145 ServerSocket s2 = new ServerSocket(s1.getLocalPort()); in test_ConstructorII()
156 int allocatedPort = s1.getLocalPort(); in test_ConstructorII()
170 startClient(s.getLocalPort()); in test_ConstructorIILjava_net_InetAddress()
186 startClient(s.getLocalPort()); in test_accept()
192 int localPort1 = s.getLocalPort(); in test_accept()
193 int localPort2 = sconn.getLocalPort(); in test_accept()
303 .getLocalPort()); in test_getLocalPort()
383 startClient(s.getLocalPort()); in test_setSoTimeoutI()
394 int portNumber = s.getLocalPort(); in test_toString()
[all …]
DMulticastSocketTest.java131 int port = orig.getLocalPort(); in constructorI()
247 MulticastSocket sendingSocket = new MulticastSocket(receivingSocket.getLocalPort()); in test_joinGroupLjava_net_InetAddress()
249 new InetSocketAddress(group, receivingSocket.getLocalPort()); in test_joinGroupLjava_net_InetAddress()
339 new InetSocketAddress(group, receivingSocket.getLocalPort()); in check_joinGroupLjava_net_SocketAddressLjava_net_NetworkInterface()
363 groupAddress = new InetSocketAddress(group, receivingSocket.getLocalPort()); in check_joinGroupLjava_net_SocketAddressLjava_net_NetworkInterface()
369 new InetSocketAddress(group2, receivingSocket.getLocalPort()); in check_joinGroupLjava_net_SocketAddressLjava_net_NetworkInterface()
424 new InetSocketAddress(group, receivingSocket.getLocalPort()); in joinGroupLjava_net_SocketAddressLjava_net_NetworkInterface()
474 SocketAddress groupSockAddr = new InetSocketAddress(group, mss.getLocalPort()); in check_joinGroupLjava_net_SocketAddressLjava_net_NetworkInterface_multiple_joins()
500 InetSocketAddress groupAddress = new InetSocketAddress(group, mss.getLocalPort()); in check_leaveGroupLjava_net_InetAddress()
571 groupSockAddr = new InetSocketAddress(group, mss.getLocalPort()); in check_leaveGroupLjava_net_SocketAddressLjava_net_NetworkInterface()
[all …]
DDatagramSocketTest.java87 return serverSocket.getLocalPort(); in getPort()
127 assertTrue("Created socket with incorrect port", ds.getLocalPort() != 0); in test_ConstructorILjava_net_InetAddress()
172 ds.connect(localHost, ds.getLocalPort()); in testConnect_connectToSelf()
174 ds.getLocalPort()); in testConnect_connectToSelf()
365 assertTrue("Returned incorrect port", ds.getLocalPort() != 0); in test_getLocalPort()
619 assertTrue("Created socket with incorrect port", ds.getLocalPort() != 0); in test_ConstructorLjava_net_SocketAddress()
649 new DatagramSocket(socket1.getLocalPort()); in test_bindLjava_net_SocketAddress_address_in_use()
759 assertTrue(theSocket.getLocalPort() > 0); in test_getLocalSocketAddress_late_bind()
780 assertFalse(0 == s.getLocalPort()); in test_getLocalSocketAddress_ANY()
795 … theSocket2.bind(new InetSocketAddress(InetAddress.getLocalHost(), theSocket1.getLocalPort())); in test_setReuseAddressZ()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/
DSocketFactoryTest.java47 assertEquals(-1, s.getLocalPort()); in test_createSocket()
60 int sport = new ServerSocket(0).getLocalPort(); in test_createSocket_StringI()
82 sf.createSocket(InetAddress.getLocalHost().getHostName(), s.getLocalPort()); in test_createSocket_StringI()
97 int sport = new ServerSocket(0).getLocalPort(); in test_createSocket_InetAddressI()
113 sf.createSocket(InetAddress.getLocalHost(), s.getLocalPort()); in test_createSocket_InetAddressI()
128 int sport = new ServerSocket(0).getLocalPort(); in test_createSocket_InetAddressIInetAddressI()
134 int portNumber = s.getLocalPort(); in test_createSocket_InetAddressIInetAddressI()
155 int validPort = new ServerSocket(0).getLocalPort(); in test_createSocket_InetAddressIInetAddressI_IllegalArgumentException()
184 int validServerPortNumber = new ServerSocket(0).getLocalPort(); in test_createSocket_InetAddressIInetAddressI_ExceptionOrder()
193 int assignedLocalPortNumber = s.getLocalPort(); in test_createSocket_InetAddressIInetAddressI_ExceptionOrder()
[all …]
DServerSocketFactoryTest.java52 sf.createServerSocket(ss.getLocalPort()); in test_createServerSocket_I()
72 sf.createServerSocket(ss.getLocalPort(), 0); in test_createServerSocket_II()
93 sf.createServerSocket(ss.getLocalPort(), 0, InetAddress.getLocalHost()); in test_createServerSocket_IIInetAddress()
/libcore/luni/src/test/java/libcore/java/net/
DOldServerSocketTest.java60 int portNumber = theSocket.getLocalPort(); in performancePreferenceTest()
90 startClient(s.getLocalPort()); in test_ConstructorII()
129 assertEquals(-1, ss.getLocalPort()); in test_Constructor()
136 new ServerSocket(s.getLocalPort()); in test_ConstructorI()
142 startClient(s.getLocalPort()); in test_ConstructorI()
152 startClient(s.getLocalPort()); in test_ConstructorI()
164 new ServerSocket(ss.getLocalPort(), 10, InetAddress.getLocalHost()); in test_ConstructorIILjava_net_InetAddress()
179 assertEquals(ss1.getLocalPort(), 4242); in test_LocalPort()
184 assertEquals(ss2.getLocalPort(), 4343); in test_LocalPort()
188 assertTrue(ss3.getLocalPort() != 0); in test_LocalPort()
[all …]
DServerSocketTest.java51 new Socket(ss.getInetAddress(), ss.getLocalPort()).close(); in testTimeoutAfterAccept()
62 assertEquals(-1, ss.getLocalPort()); in testInitialState()
81 assertEquals(boundAddress.getPort(), ss.getLocalPort()); in testStateAfterClose()
DSocketTest.java82 int localPort = s.getLocalPort(); in test_getLocalAddress_after_close()
88 assertEquals(localPort, s.getLocalPort()); in test_getLocalAddress_after_close()
125 InetSocketAddress addr = new InetSocketAddress(host, ssc.socket().getLocalPort()); in checkSocketLocalAndRemoteAddresses()
147 assertEquals(outRemoteAddress.getPort(), ss.getLocalPort()); in checkSocketLocalAndRemoteAddresses()
148 assertEquals(inLocalAddress.getPort(), ss.getLocalPort()); in checkSocketLocalAndRemoteAddresses()
338 Socket socket = new Socket("localhost", serverSocket.getLocalPort()); in assertAvailableReturnsZeroAfterSocketReadsAllData()
358 assertEquals(-1, s.getLocalPort()); in testInitialState()
381 assertEquals(boundAddress.getPort(), s.getLocalPort()); in testStateAfterClose()
461 Socket client = new Socket(InetAddress.getLocalHost(), server.getLocalPort()); in testSocketWithProxySet()
504 port = serverSocket.getLocalPort(); in MockServer()
DOldDatagramPacketTest.java49 …acket packet = new DatagramPacket(bytes, 6, InetAddress.getByName("localhost"), ss.getLocalPort()); in test_getPort()
54 assertEquals(packet.getPort(), ss.getLocalPort()); in test_getPort()
DOldSocketTest.java90 s = new Socket("0.0.0.0", ss.getLocalPort()); in test_ConstructorLjava_lang_StringI()
132 Socket s2 = new Socket(InetAddress.getLocalHost(), sport, null, s1.getLocalPort()); in test_ConstructorLjava_lang_StringILjava_net_InetAddressI2()
214 Socket client = new Socket(InetAddress.getLocalHost(), server.getLocalPort()); in test_getInputStream()
277 s.getLocalPort(); in test_getLocalPort()
591 + ",localPort=" + s.getLocalPort() + "]", s.toString()); in test_toString()
598 Socket theSocket = new Socket(addr, serverSocket.getLocalPort()); in test_shutdownInput()
633 Socket theSocket = new Socket(serverSocket.getInetAddress(), serverSocket.getLocalPort()); in test_shutdownOutput()
667 assertEquals(new InetSocketAddress(InetAddress.getLocalHost(), s.getLocalPort()), in test_getLocalSocketAddress()
680 assertEquals(new InetSocketAddress(InetAddress.getLocalHost(), theSocket.getLocalPort()), in test_getLocalSocketAddress()
736 Socket theSocket = new Socket(serverSocket.getInetAddress(), serverSocket.getLocalPort()); in test_isBound()
[all …]
DOldUnixSocketTest.java45 InetAddress.getLocalHost(), pingServer.getLocalPort())); in test_getInputStream()
108 int port = ss.getLocalPort(); in test_getOutputStream()
DDatagramSocketTest.java45 assertTrue(ds.getLocalPort() > 0); in testInitialState()
48 assertEquals(ds.getLocalPort(), socketAddress.getPort()); in testInitialState()
67 assertEquals(-1, ds.getLocalPort()); in testStateAfterClose()
DMulticastSocketTest.java50 final int mcPort = mcSock.getLocalPort(); in testGroupReceive()
/libcore/ojluni/src/test/java/net/Socket/
DShutdownInput.java51 Socket s1 = new Socket(iaddr, ss.getLocalPort()); in main()
60 new InetSocketAddress(iaddr, sc.socket().getLocalPort())); in main()
/libcore/ojluni/src/main/java/java/net/
DServerSocket.java436 public int getLocalPort() { in getLocalPort() method in ServerSocket
440 return getImpl().getLocalPort(); in getLocalPort()
478 return new InetSocketAddress(getInetAddress(), getLocalPort()); in getLocalSocketAddress()
757 ",localport=" + impl.getLocalPort() + "]"; in toString()
DSocketImpl.java291 protected int getLocalPort() { in getLocalPort() method in SocketImpl
318 ",port=" + getPort() + ",localport=" + getLocalPort() + "]"; in toString()
DSocket.java797 public int getLocalPort() { in getLocalPort() method in Socket
801 return getImpl().getLocalPort(); in getLocalPort()
864 return new InetSocketAddress(getLocalAddress(), getLocalPort()); in getLocalSocketAddress()
1615 ",localPort=" + getImpl().getLocalPort() + "]"; in toString()
DSocksSocketImpl.java1071 protected int getLocalPort() { in getLocalPort() method in SocksSocketImpl
1073 return super.getLocalPort(); in getLocalPort()
1077 return super.getLocalPort(); in getLocalPort()
DDatagramSocket.java634 return new InetSocketAddress(getLocalAddress(), getLocalPort()); in getLocalSocketAddress()
909 public int getLocalPort() { in getLocalPort() method in DatagramSocket
913 return getImpl().getLocalPort(); in getLocalPort()
/libcore/luni/src/test/java/libcore/javax/net/ssl/
DSSLSocketTest.java74 System.out.println("client=" + test.client.getLocalPort() in stress_test_TestSSLSocketPair_create()
75 + " server=" + test.server.getLocalPort()); in stress_test_TestSSLSocketPair_create()
/libcore/luni/src/test/java/libcore/javax/net/
DServerSocketFactoryTest.java79 Socket socket = new Socket(InetAddress.getLocalHost(), serverSocket.getLocalPort()); in testSocket()
81 InetAddress.getLocalHost(), serverSocket.getLocalPort())); in testSocket()
/libcore/ojluni/src/main/java/sun/nio/ch/
DServerSocketAdaptor.java87 public int getLocalPort() { in getLocalPort() method in ServerSocketAdaptor
182 ",localport=" + getLocalPort() + "]"; in toString()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DSSLServerSocketTest.java144 new mySSLServerSocket(ssl.getLocalPort()); in testConstructor_I()
166 new mySSLServerSocket(ssl.getLocalPort(), 1); in testConstructor_II()
192 new mySSLServerSocket(ssl.getLocalPort(), 0, InetAddress.getLocalHost()); in testConstructor_IIInetAddress()
/libcore/luni/src/test/java/libcore/java/nio/channels/
DSocketChannelTest.java152 assertEquals(-1, socket.getLocalPort()); in test_open_initialState()
353 server1.getLocalPort()); in test_shutdownInput()
381 "127.0.0.1", server1.getLocalPort()); in test_shutdownOutput()

123