Home
last modified time | relevance | path

Searched refs:theSocket (Results 1 – 7 of 7) sorted by relevance

/libcore/luni/src/test/java/libcore/java/net/
DOldSocketTest.java225 Socket theSocket = new Socket(InetAddress.getLocalHost(), sport, null, 0); in test_getKeepAlive() local
226 theSocket.setKeepAlive(true); in test_getKeepAlive()
227 assertTrue("getKeepAlive false when it should be true", theSocket in test_getKeepAlive()
229 theSocket.setKeepAlive(false); in test_getKeepAlive()
230 assertFalse("getKeepAlive true when it should be False", theSocket in test_getKeepAlive()
232 theSocket.close(); in test_getKeepAlive()
234 theSocket.setKeepAlive(false); in test_getKeepAlive()
241 theSocket.getKeepAlive(); in test_getKeepAlive()
443 try (Socket theSocket = new Socket(InetAddress.getLocalHost(), sport, null, 0)) { in test_setKeepAliveZ() argument
444 theSocket.setKeepAlive(true); in test_setKeepAliveZ()
[all …]
DOldServerSocketTest.java54 ServerSocket theSocket = new ServerSocket(); in performancePreferenceTest() local
55 theSocket.setPerformancePreferences(connectionTime, latency, bandwidth); in performancePreferenceTest()
59 theSocket.bind(theAddress); in performancePreferenceTest()
60 int portNumber = theSocket.getLocalPort(); in performancePreferenceTest()
63 + theSocket.getLocalSocketAddress().toString() in performancePreferenceTest()
66 portNumber)).toString(), theSocket in performancePreferenceTest()
70 assertTrue("Server socket not bound when it should be:", theSocket in performancePreferenceTest()
79 Socket servSock = theSocket.accept(); in performancePreferenceTest()
82 theSocket.close(); in performancePreferenceTest()
DOldUnixSocketTest.java92 Socket theSocket = new Socket(); in test_connectLjava_net_SocketAddressI() local
94 theSocket.connect(new InetSocketAddress(InetAddress.getLocalHost(), in test_connectLjava_net_SocketAddressI()
100 theSocket.close(); in test_connectLjava_net_SocketAddressI()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DServerSocketTest.java412 ServerSocket theSocket = new ServerSocket(); in test_bindLjava_net_SocketAddress() local
415 theSocket.bind(theAddress); in test_bindLjava_net_SocketAddress()
416 int portNumber = theSocket.getLocalPort(); in test_bindLjava_net_SocketAddress()
419 + theSocket.getLocalSocketAddress().toString() in test_bindLjava_net_SocketAddress()
422 portNumber)).toString(), theSocket in test_bindLjava_net_SocketAddress()
426 assertTrue("Server socket not bound when it should be:", theSocket in test_bindLjava_net_SocketAddress()
435 Socket servSock = theSocket.accept(); in test_bindLjava_net_SocketAddress()
438 theSocket.close(); in test_bindLjava_net_SocketAddress()
444 theSocket = new ServerSocket(); in test_bindLjava_net_SocketAddress()
445 theSocket.bind(null); in test_bindLjava_net_SocketAddress()
[all …]
DDatagramSocketTest.java370 try (DatagramSocket theSocket = new DatagramSocket()) { in test_getPort() argument
372 theSocket.getPort()); in test_getPort()
376 theSocket.connect(InetAddress.getLocalHost(), portNumber); in test_getPort()
377 assertEquals("getPort returned wrong value", portNumber, theSocket in test_getPort()
640 DatagramSocket theSocket = new DatagramSocket((SocketAddress) null); in test_bindLjava_net_SocketAddress_null() local
641 theSocket.bind(null); in test_bindLjava_net_SocketAddress_null()
642 assertNotNull(theSocket.getLocalSocketAddress()); in test_bindLjava_net_SocketAddress_null()
643 theSocket.close(); in test_bindLjava_net_SocketAddress_null()
663 DatagramSocket theSocket = new DatagramSocket((SocketAddress) null); in test_bindLjava_net_SocketAddress_unsupported_address_type() local
665 theSocket.bind(new mySocketAddress()); in test_bindLjava_net_SocketAddress_unsupported_address_type()
[all …]
DSocketTest.java163 Socket theSocket = new Socket(); in test_bindLjava_net_SocketAddress() local
167 theSocket.bind(bogusAddress); in test_bindLjava_net_SocketAddress()
172 theSocket.close(); in test_bindLjava_net_SocketAddress()
175 theSocket = new Socket(); in test_bindLjava_net_SocketAddress()
176 theSocket.bind(new InetSocketAddress(InetAddress.getLocalHost(), 0)); in test_bindLjava_net_SocketAddress()
177 int portNumber = theSocket.getLocalPort(); in test_bindLjava_net_SocketAddress()
183 theSocket.getLocalSocketAddress()); in test_bindLjava_net_SocketAddress()
195 theSocket.connect(boundAddress); in test_bindLjava_net_SocketAddress()
201 theSocket.close(); in test_bindLjava_net_SocketAddress()
207 theSocket = new Socket(); in test_bindLjava_net_SocketAddress()
[all …]
DSocketImplTest.java50 MockSocketImpl theSocket = new MockSocketImpl(); in test_setPerformancePreference_Int_Int_Int() local
51 theSocket.setPerformancePreference(1, 1, 1); in test_setPerformancePreference_Int_Int_Int()