/libcore/luni/src/test/java/libcore/java/net/ |
D | ServerSocketTest.java | 34 try (ServerSocket ss = new ServerSocket(0)) { in testTimeoutAfterAccept() argument 35 ss.setReuseAddress(true); in testTimeoutAfterAccept() 38 ss.setSoTimeout(1234); in testTimeoutAfterAccept() 43 result[0] = ss.accept(); in testTimeoutAfterAccept() 51 new Socket(ss.getInetAddress(), ss.getLocalPort()).close(); in testTimeoutAfterAccept() 58 ServerSocket ss = new ServerSocket(); in testInitialState() local 60 assertFalse(ss.isBound()); in testInitialState() 61 assertFalse(ss.isClosed()); in testInitialState() 62 assertEquals(-1, ss.getLocalPort()); in testInitialState() 63 assertNull(ss.getLocalSocketAddress()); in testInitialState() [all …]
|
D | ConcurrentCloseTest.java | 46 ServerSocket ss = new ServerSocket(0); in test_accept() local 47 new Killer(ss).start(); in test_accept() 50 Socket s = ss.accept(); in test_accept() 103 SilentServer ss = new SilentServer(); in test_read() local 105 s.connect(ss.getLocalSocketAddress()); in test_read() 114 ss.close(); in test_read() 118 SilentServer ss = new SilentServer(); in test_read_multiple() local 120 s.connect(ss.getLocalSocketAddress()); in test_read_multiple() 157 ss.close(); in test_read_multiple() 175 final SilentServer ss = new SilentServer(128); // Minimal receive buffer size. in test_write() local [all …]
|
D | OldDatagramPacketTest.java | 31 final DatagramSocket ss = new DatagramSocket(); in test_getPort() local 36 ss.setSoTimeout(3000); in test_getPort() 37 ss.receive(packet); in test_getPort() 38 ss.send(packet); in test_getPort() 49 …acket packet = new DatagramPacket(bytes, 6, InetAddress.getByName("localhost"), ss.getLocalPort()); in test_getPort() 54 assertEquals(packet.getPort(), ss.getLocalPort()); in test_getPort() 57 ss.close(); in test_getPort()
|
D | OldServerSocketTest.java | 128 ServerSocket ss = new ServerSocket(); in test_Constructor() local 129 assertEquals(-1, ss.getLocalPort()); in test_Constructor() 130 ss.close(); in test_Constructor() 162 ServerSocket ss = new ServerSocket(0, 10, InetAddress.getLocalHost()); in test_ConstructorIILjava_net_InetAddress() local 164 new ServerSocket(ss.getLocalPort(), 10, InetAddress.getLocalHost()); in test_ConstructorIILjava_net_InetAddress() 168 ss.close(); in test_ConstructorIILjava_net_InetAddress() 200 ServerSocket ss = null; in test_ConstructorI_SocksSet() local 205 ss = new ServerSocket(0); in test_ConstructorI_SocksSet() 208 if (null != ss) { in test_ConstructorI_SocksSet() 209 ss.close(); in test_ConstructorI_SocksSet() [all …]
|
D | OldUnixSocketTest.java | 107 ServerSocket ss = new ServerSocket(0); in test_getOutputStream() local 108 int port = ss.getLocalPort(); in test_getOutputStream() 109 ss.close(); in test_getOutputStream()
|
D | SocketTest.java | 117 ServerSocket ss = ssc.socket(); in checkSocketLocalAndRemoteAddresses() local 147 assertEquals(outRemoteAddress.getPort(), ss.getLocalPort()); in checkSocketLocalAndRemoteAddresses() 148 assertEquals(inLocalAddress.getPort(), ss.getLocalPort()); in checkSocketLocalAndRemoteAddresses() 151 assertEquals(inLocalAddress.getAddress(), ss.getInetAddress()); in checkSocketLocalAndRemoteAddresses() 152 assertEquals(inRemoteAddress.getAddress(), ss.getInetAddress()); in checkSocketLocalAndRemoteAddresses() 153 assertEquals(outLocalAddress.getAddress(), ss.getInetAddress()); in checkSocketLocalAndRemoteAddresses() 154 assertEquals(outRemoteAddress.getAddress(), ss.getInetAddress()); in checkSocketLocalAndRemoteAddresses() 610 try (ServerSocket ss = new ServerSocket(port, 0, addr)) { 613 ss.accept();
|
D | SocketTimeoutTest.java | 92 try (ServerSocket ss = new ServerSocket(0)) { in testSocketReadTimeout() argument 97 s.connect(ss.getLocalSocketAddress()); in testSocketReadTimeout()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ |
D | ServerSocketFactoryTest.java | 41 ServerSocket ss = sf.createServerSocket(); in test_createServerSocket() local 42 assertNotNull(ss); in test_createServerSocket() 43 ss.close(); in test_createServerSocket() 48 ServerSocket ss = sf.createServerSocket(0); in test_createServerSocket_I() local 49 assertNotNull(ss); in test_createServerSocket_I() 52 sf.createServerSocket(ss.getLocalPort()); in test_createServerSocket_I() 57 ss.close(); in test_createServerSocket_I() 68 ServerSocket ss = sf.createServerSocket(0, 0); in test_createServerSocket_II() local 69 assertNotNull(ss); in test_createServerSocket_II() 72 sf.createServerSocket(ss.getLocalPort(), 0); in test_createServerSocket_II() [all …]
|
/libcore/luni/src/main/native/ |
D | NetworkUtilities.cpp | 37 jobject sockaddrToInetAddress(JNIEnv* env, const sockaddr_storage& ss, jint* port) { in sockaddrToInetAddress() argument 40 const sockaddr_in6& sin6 = reinterpret_cast<const sockaddr_in6&>(ss); in sockaddrToInetAddress() 41 if (ss.ss_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(&sin6.sin6_addr)) { in sockaddrToInetAddress() 45 memcpy(&tmp, &ss, sizeof(sockaddr_in6)); in sockaddrToInetAddress() 59 if (ss.ss_family == AF_INET) { in sockaddrToInetAddress() 60 const sockaddr_in& sin = reinterpret_cast<const sockaddr_in&>(ss); in sockaddrToInetAddress() 64 } else if (ss.ss_family == AF_INET6) { in sockaddrToInetAddress() 65 const sockaddr_in6& sin6 = reinterpret_cast<const sockaddr_in6&>(ss); in sockaddrToInetAddress() 74 "sockaddrToInetAddress unsupported ss_family: %i", ss.ss_family); in sockaddrToInetAddress() 97 static bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss,… in inetAddressToSockaddr() argument [all …]
|
D | NetworkUtilities.h | 24 jobject sockaddrToInetAddress(JNIEnv* env, const sockaddr_storage& ss, int* port); 31 sockaddr_storage& ss, socklen_t& sa_len); 40 sockaddr_storage& ss, socklen_t& sa_len);
|
D | libcore_io_Linux.cpp | 369 static jbyteArray getUnixSocketPath(JNIEnv* env, const sockaddr_storage& ss, in getUnixSocketPath() argument 371 if (ss.ss_family != AF_UNIX) { in getUnixSocketPath() 373 "getUnixSocketPath unsupported ss_family: %i", ss.ss_family); in getUnixSocketPath() 377 const struct sockaddr_un* un_addr = reinterpret_cast<const struct sockaddr_un*>(&ss); in getUnixSocketPath() 395 static jobject makeSocketAddress(JNIEnv* env, const sockaddr_storage& ss, const socklen_t sa_len) { in makeSocketAddress() argument 396 if (ss.ss_family == AF_INET || ss.ss_family == AF_INET6) { in makeSocketAddress() 398 jobject inetAddress = sockaddrToInetAddress(env, ss, &port); in makeSocketAddress() 408 } else if (ss.ss_family == AF_UNIX) { in makeSocketAddress() 414 jbyteArray javaSunPath = getUnixSocketPath(env, ss, sa_len); in makeSocketAddress() 419 } else if (ss.ss_family == AF_NETLINK) { in makeSocketAddress() [all …]
|
D | ScopedMsghdr.h | 43 void setMsgNameAndLen(sockaddr* ss, socklen_t sa_len) { in setMsgNameAndLen() argument 44 mMsghdrValue.msg_name = ss; in setMsgNameAndLen()
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | AsynchronousSocketChannelTest.java | 56 ServerSocket ss = new ServerSocket(0); in test_connect() local 65 InetSocketAddress remoteAddress = new InetSocketAddress("localhost", ss.getLocalPort()); in test_connect() 68 Socket s = ss.accept(); in test_connect() 78 ss.close(); in test_connect() 135 ServerSocket ss = new ServerSocket(0); in test_bind_usedAddress() local 137 asc.bind(ss.getLocalSocketAddress()); in test_bind_usedAddress() 145 ss.close(); in test_bind_usedAddress() 271 ServerSocket ss = new ServerSocket(0); in test_futureReadWrite() local 275 Future<Void> connectFuture = asc.connect(ss.getLocalSocketAddress()); in test_futureReadWrite() 283 Socket sss = ss.accept(); in test_futureReadWrite() [all …]
|
D | SocketChannelTest.java | 51 try (ServerSocket ss = new ServerSocket(0); in test_read_intoReadOnlyByteArrays() argument 52 SocketChannel sc = SocketChannel.open(ss.getLocalSocketAddress())) { in test_read_intoReadOnlyByteArrays() 54 ss.setReuseAddress(true); in test_read_intoReadOnlyByteArrays() 102 ServerSocket ss = new ServerSocket(0); in test_channelSocketOutputStreamClosureState() local 104 SocketChannel sc = SocketChannel.open(ss.getLocalSocketAddress()); in test_channelSocketOutputStreamClosureState() 118 ss.close(); in test_channelSocketOutputStreamClosureState() 123 ServerSocket ss = new ServerSocket(0); in test_channelSocketInputStreamClosureState() local 125 SocketChannel sc = SocketChannel.open(ss.getLocalSocketAddress()); in test_channelSocketInputStreamClosureState() 139 ss.close(); in test_channelSocketInputStreamClosureState() 236 ServerSocket ss = new ServerSocket(0); in test_connect_blocking() local [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | SSLSessionBindingListenerTest.java | 65 SSLSession ss = sock.getSession(); in test_valueBound() local 67 ss.putValue("test", sbl); in test_valueBound() 79 SSLSession ss = sock.getSession(); in test_valueUnbound() local 81 ss.putValue("test", sbl); in test_valueUnbound() 82 ss.removeValue("test"); in test_valueUnbound()
|
D | SSLSocketFactoryTest.java | 30 private ServerSocket ss; field in SSLSocketFactoryTest 34 ss = new ServerSocket(0); in startServer() 38 return ss.getLocalPort(); in startServer()
|
D | HandshakeCompletedEventTest.java | 179 SSLSession ss = event.getSession(); in test_getSession() local 180 assertNotNull(ss); in test_getSession() 181 assertEquals(session, ss); in test_getSession() 191 SSLSocket ss = event.getSocket(); in test_getSocket() local 192 assertNotNull(ss); in test_getSocket() 193 assertEquals(socket, ss); in test_getSocket()
|
/libcore/luni/src/main/java/javax/xml/transform/sax/ |
D | SAXSource.java | 191 StreamSource ss = (StreamSource) source; in sourceToInputSource() local 192 InputSource isource = new InputSource(ss.getSystemId()); in sourceToInputSource() 194 isource.setByteStream(ss.getInputStream()); in sourceToInputSource() 195 isource.setCharacterStream(ss.getReader()); in sourceToInputSource() 196 isource.setPublicId(ss.getPublicId()); in sourceToInputSource()
|
/libcore/ojluni/src/test/java/net/Socket/ |
D | ShutdownInput.java | 50 try ( ServerSocket ss = new ServerSocket(0); in main() argument 51 Socket s1 = new Socket(iaddr, ss.getLocalPort()); in main() 52 Socket s2 = ss.accept() ) { in main()
|
/libcore/support/src/test/java/tests/support/ |
D | Support_UnmodifiableCollectionTest.java | 73 SortedSet<Integer> ss = new TreeSet<Integer>(); in runTest() local 75 ss.add(it.next()); in runTest() 77 it = ss.iterator(); in runTest()
|
D | Support_TestWebServer.java | 213 ServerSocket ss = null; field in Support_TestWebServer.AcceptThread 217 ss = new ServerSocket(0); in init() 218 ss.setSoTimeout(5000); in init() 219 ss.setReuseAddress(true); in init() 220 return ss.getLocalPort(); in init() 229 Socket s = ss.accept(); in run() 248 ss.close(); in close()
|
/libcore/ojluni/src/main/java/java/io/ |
D | File.java | 1214 String[] ss = list(); in listFiles() local 1215 if (ss == null) return null; in listFiles() 1216 int n = ss.length; in listFiles() 1219 fs[i] = new File(ss[i], this); in listFiles() 1255 String ss[] = list(); in listFiles() local 1256 if (ss == null) return null; in listFiles() 1258 for (String s : ss) in listFiles() 1293 String ss[] = list(); in listFiles() local 1294 if (ss == null) return null; in listFiles() 1296 for (String s : ss) { in listFiles()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
D | SelectionKeyTest.java | 296 ServerSocket ss = new ServerSocket(0); in test_readyOps() local 298 sc.connect(new InetSocketAddress(LOCAL_ADDR, ss.getLocalPort())); in test_readyOps() 304 ss.close(); in test_readyOps() 305 ss = null; in test_readyOps()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
D | ServerSocketTest.java | 115 ServerSocket ss = null; in test_ConstructorI_SocksSet() local 120 ss = new ServerSocket(0); in test_ConstructorI_SocksSet() 123 if (null != ss) { in test_ConstructorI_SocksSet() 124 ss.close(); in test_ConstructorI_SocksSet() 202 final ServerSocket ss = new ServerSocket(0); in test_accept() local 203 ss.setSoTimeout(12000); in test_accept() 207 ss.accept(); in test_accept() 222 ss.close(); in test_accept()
|
/libcore/luni/src/test/java/tests/security/cert/ |
D | CertStore1Test.java | 115 CertStore [] ss = new CertStore[3]; in createCS() local 116 ss[0] = CertStore.getInstance(dType, dParams); in createCS() 117 ss[1] = CertStore.getInstance(dType, dParams, dProv); in createCS() 118 ss[2] = CertStore.getInstance(dType, dParams, dName); in createCS() 119 return ss; in createCS()
|