/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
D | ServerSocketChannelTest.java | 117 assertNull(ssc.socket().getLocalSocketAddress()); in test_bind_null() 119 ssc.socket().bind(null); in test_bind_null() 121 … InetSocketAddress localAddress = (InetSocketAddress) ssc.socket().getLocalSocketAddress(); in test_bind_null() 131 portHog.socket().bind(null); in test_bind_failure() 136 ssc.socket().bind(portHog.socket().getLocalSocketAddress()); in test_bind_failure() 150 ssc.socket().bind(null); in test_bind_closed() 161 portPickingChannel.socket().bind(null); in test_bind_explicitPort() 163 …InetSocketAddress address = (InetSocketAddress) portPickingChannel.socket().getLocalSocketAddress(… in test_bind_explicitPort() 171 ssc.socket().bind(bindAddress); in test_bind_explicitPort() 173 InetSocketAddress boundAddress = (InetSocketAddress) ssc.socket().getLocalSocketAddress(); in test_bind_explicitPort() [all …]
|
D | SocketChannelTest.java | 160 assertNull(channel1.socket().getLocalSocketAddress()); in testBind_Null() 162 channel1.socket().bind(null); in testBind_Null() 164 … InetSocketAddress localAddress = (InetSocketAddress) channel1.socket().getLocalSocketAddress(); in testBind_Null() 170 assertNull(channel1.socket().getLocalSocketAddress()); in testBind_Failure() 174 channel1.socket().bind(localAddr1); in testBind_Failure() 184 channel1.socket().bind(null); in testBind_Closed() 193 portPickingChannel.socket().bind(null); in testBind_explicitPort() 194 …InetSocketAddress address = (InetSocketAddress) portPickingChannel.socket().getLocalSocketAddress(… in testBind_explicitPort() 202 channel1.socket().setReuseAddress(true); in testBind_explicitPort() 203 channel1.socket().bind(bindAddress); in testBind_explicitPort() [all …]
|
D | DatagramChannelTest.java | 78 channel1.socket().bind(new InetSocketAddress(Inet6Address.LOOPBACK, 0)); in setUp() 79 channel2.socket().bind(new InetSocketAddress(Inet6Address.LOOPBACK, 0)); in setUp() 81 channel1Address = (InetSocketAddress) channel1.socket().getLocalSocketAddress(); in setUp() 82 channel2Address = (InetSocketAddress) channel2.socket().getLocalSocketAddress(); in setUp() 269 DatagramSocket s1 = dc.socket(); in testSocket_BasicStatusBeforeConnect() 288 DatagramSocket s2 = dc.socket(); in testSocket_BasicStatusBeforeConnect() 302 DatagramSocket s1 = dc.socket(); in testSocket_Block_BasicStatusAfterConnect() 304 DatagramSocket s2 = dc.socket(); in testSocket_Block_BasicStatusAfterConnect() 316 DatagramSocket s1 = dc.socket(); in testSocket_NonBlock_BasicStatusAfterConnect() 318 DatagramSocket s2 = dc.socket(); in testSocket_NonBlock_BasicStatusAfterConnect() [all …]
|
D | UnixSelectorTest.java | 32 ServerSocket socket = null; field in UnixSelectorTest.Server 39 this.socket = serverChannel.socket(); in initialize() 40 socket.bind(null); in initialize() 80 boolean isConnected = socketChannel.connect(server.socket.getLocalSocketAddress()); in testSelectorAcceptAndRead()
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | SocketChannelTest.java | 107 Socket scSocket = sc.socket(); in test_channelSocketOutputStreamClosureState() 128 Socket scSocket = sc.socket(); in test_channelSocketInputStreamClosureState() 146 assertNull(sc.socket().getLocalSocketAddress()); in test_open_initialState() 148 Socket socket = sc.socket(); in test_open_initialState() local 149 assertFalse(socket.isBound()); in test_open_initialState() 150 assertFalse(socket.isClosed()); in test_open_initialState() 151 assertFalse(socket.isConnected()); in test_open_initialState() 152 assertEquals(-1, socket.getLocalPort()); in test_open_initialState() 153 assertTrue(socket.getLocalAddress().isAnyLocalAddress()); in test_open_initialState() 154 assertNull(socket.getLocalSocketAddress()); in test_open_initialState() [all …]
|
D | DatagramChannelTest.java | 75 dc.socket().bind(null); in testNonBlockingRecv() 86 DatagramSocket socket = dc.socket(); in testInitialState() local 87 assertFalse(socket.isBound()); in testInitialState() 88 assertFalse(socket.getBroadcast()); in testInitialState() 89 assertFalse(socket.isClosed()); in testInitialState() 90 assertFalse(socket.isConnected()); in testInitialState() 91 assertEquals(0, socket.getLocalPort()); in testInitialState() 92 assertTrue(socket.getLocalAddress().isAnyLocalAddress()); in testInitialState() 93 assertNull(socket.getLocalSocketAddress()); in testInitialState() 94 assertNull(socket.getInetAddress()); in testInitialState() [all …]
|
D | ServerSocketChannelTest.java | 56 ssc.socket().bind(null); in testNonBlockingAccept() 66 assertNull(ssc.socket().getLocalSocketAddress()); in open_initialState() 68 ServerSocket socket = ssc.socket(); in open_initialState() local 69 assertFalse(socket.isBound()); in open_initialState() 70 assertFalse(socket.isClosed()); in open_initialState() 71 assertEquals(-1, socket.getLocalPort()); in open_initialState() 72 assertNull(socket.getLocalSocketAddress()); in open_initialState() 73 assertNull(socket.getInetAddress()); in open_initialState() 74 assertTrue(socket.getReuseAddress()); in open_initialState() 76 assertSame(ssc, socket.getChannel()); in open_initialState() [all …]
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | DelegatingSocketFactory.java | 41 protected Socket configureSocket(Socket socket) throws IOException { in configureSocket() argument 42 return socket; in configureSocket() 47 Socket socket = mDelegate.createSocket(); in createSocket() local 48 return configureSocket(socket); in createSocket() 53 Socket socket = mDelegate.createSocket(host, port); in createSocket() local 54 return configureSocket(socket); in createSocket() 60 Socket socket = mDelegate.createSocket(host, port, localHost, localPort); in createSocket() local 61 return configureSocket(socket); in createSocket() 66 Socket socket = mDelegate.createSocket(host, port); in createSocket() local 67 return configureSocket(socket); in createSocket() [all …]
|
D | SocketTest.java | 116 ssc.socket().bind(listenAddr, 0); in checkSocketLocalAndRemoteAddresses() 117 ServerSocket ss = ssc.socket(); in checkSocketLocalAndRemoteAddresses() 123 out.socket().setTcpNoDelay(false); in checkSocketLocalAndRemoteAddresses() 125 InetSocketAddress addr = new InetSocketAddress(host, ssc.socket().getLocalPort()); in checkSocketLocalAndRemoteAddresses() 133 in.socket().setTcpNoDelay(false); in checkSocketLocalAndRemoteAddresses() 136 InetSocketAddress listenAddress = (InetSocketAddress) in.socket().getLocalSocketAddress(); in checkSocketLocalAndRemoteAddresses() 137 … InetSocketAddress outRemoteAddress = (InetSocketAddress) out.socket().getRemoteSocketAddress(); in checkSocketLocalAndRemoteAddresses() 138 … InetSocketAddress outLocalAddress = (InetSocketAddress) out.socket().getLocalSocketAddress(); in checkSocketLocalAndRemoteAddresses() 139 InetSocketAddress inLocalAddress = (InetSocketAddress) in.socket().getLocalSocketAddress(); in checkSocketLocalAndRemoteAddresses() 140 … InetSocketAddress inRemoteAddress = (InetSocketAddress) in.socket().getRemoteSocketAddress(); in checkSocketLocalAndRemoteAddresses() [all …]
|
D | OldAndroidDatagramTest.java | 42 DatagramSocket socket; field in OldAndroidDatagramTest.Reflector 59 socket.receive(packet); in run() 74 socket.send(packet); in run() 81 socket.close(); in run() 91 socket = new DatagramSocket(port, address); in Reflector() 121 DatagramSocket socket = null; in testDatagram() local 131 socket = new DatagramSocket(2345, InetAddress.getLocalHost()); in testDatagram() 141 socket.send(packet); in testDatagram() 150 socket.receive(packet); in testDatagram() 161 if (socket != null) { in testDatagram() [all …]
|
D | ServerSocketConcurrentCloseTest.java | 56 public void implAcceptExposedForTest(Socket socket) throws IOException { in testImplAccept_detectsClosedState() argument 57 implAccept(socket); in testImplAccept_detectsClosedState() 69 Socket socket = new Socket((SocketImpl) null) { }; in testImplAccept_detectsClosedState() 70 serverSocket.implAcceptExposedForTest(socket); in testImplAccept_detectsClosedState() 202 Socket socket = new Socket(); in run() local 203 socket.connect(socketAddress, /* timeout (msec) */ 10); in run() 204 socket.close(); in run() 236 Socket socket = serverSocket.accept(); in run() local 238 socket.close(); in run()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | HandshakeCompletedEventTest.java | 74 SSLSocket socket = (SSLSocket) SSLSocketFactory.getDefault().createSocket(); in test_Constructor() local 75 HandshakeCompletedEvent event = new HandshakeCompletedEvent(socket, session); in test_Constructor() 89 SSLSocket socket = (SSLSocket) SSLSocketFactory.getDefault().createSocket(); in test_getCipherSuite() local 90 HandshakeCompletedEvent event = new HandshakeCompletedEvent(socket, session); in test_getCipherSuite() 100 SSLSocket socket = (SSLSocket) SSLSocketFactory.getDefault().createSocket(); in test_getLocalCertificates() local 101 HandshakeCompletedEvent event = new HandshakeCompletedEvent(socket, session); in test_getLocalCertificates() 111 SSLSocket socket = (SSLSocket) SSLSocketFactory.getDefault().createSocket(); in test_getLocalPrincipal() local 112 HandshakeCompletedEvent event = new HandshakeCompletedEvent(socket, session); in test_getLocalPrincipal() 123 SSLSocket socket = (SSLSocket) SSLSocketFactory.getDefault().createSocket(); in test_getPeerCertificateChain() local 124 HandshakeCompletedEvent event = new HandshakeCompletedEvent(socket, session); in test_getPeerCertificateChain() [all …]
|
/libcore/dalvik/src/main/java/dalvik/system/ |
D | SocketTagger.java | 95 public final void tag(Socket socket) throws SocketException { in tag() argument 96 if (!socket.isClosed()) { in tag() 97 tag(socket.getFileDescriptor$()); in tag() 118 public final void untag(Socket socket) throws SocketException { in untag() argument 119 if (!socket.isClosed()) { in untag() 120 untag(socket.getFileDescriptor$()); in untag() 136 public final void tag(DatagramSocket socket) throws SocketException { in tag() argument 137 if (!socket.isClosed()) { in tag() 138 tag(socket.getFileDescriptor$()); in tag() 158 public final void untag(DatagramSocket socket) throws SocketException { in untag() argument [all …]
|
/libcore/support/src/test/java/org/apache/harmony/xnet/tests/support/ |
D | SSLSocketFactoryImpl.java | 17 public Socket createSocket(Socket socket, String s, int i, boolean flag) in createSocket() argument 19 if (socket == null) { in createSocket() 30 socket = new Socket(s, i); in createSocket() 32 socket = new Socket(s, i); in createSocket() 33 socket.close(); in createSocket() 35 return socket; in createSocket()
|
/libcore/ojluni/src/main/java/javax/net/ssl/ |
D | SSLContextSpi.java | 168 SSLSocket socket = getDefaultSocket(); in engineGetDefaultSSLParameters() local 169 return socket.getSSLParameters(); in engineGetDefaultSSLParameters() 192 SSLSocket socket = getDefaultSocket(); in engineGetSupportedSSLParameters() local 194 params.setCipherSuites(socket.getSupportedCipherSuites()); in engineGetSupportedSSLParameters() 195 params.setProtocols(socket.getSupportedProtocols()); in engineGetSupportedSSLParameters()
|
/libcore/luni/src/test/java/libcore/javax/net/ssl/ |
D | SSLSocketTest.java | 61 SSLSocket socket = new PlainSSLSocket(); in test_SSLSocket_toString() local 62 assertTrue(socket.toString().startsWith("SSLSocket[")); in test_SSLSocket_toString() 91 SSLSocket socket = new PlainSSLSocket(); in test_Alpn() local 93 socket.getApplicationProtocol(); in test_Alpn() 98 socket.getHandshakeApplicationProtocol(); in test_Alpn() 103 socket.setHandshakeApplicationProtocolSelector( in test_Alpn() 114 socket.getHandshakeApplicationProtocolSelector(); in test_Alpn()
|
/libcore/luni/src/test/java/libcore/javax/net/ |
D | ServerSocketFactoryTest.java | 79 Socket socket = new Socket(InetAddress.getLocalHost(), serverSocket.getLocalPort()); in testSocket() local 83 InputStream in = socket.getInputStream(); in testSocket() 87 socket.close(); in testSocket() 102 Socket socket = new Socket(); in assertBacklog() local 103 backlog.add(socket); in assertBacklog() 104 socket.connect(serverAddress, 500); in assertBacklog() 110 for (Socket socket : backlog) { in assertBacklog() 111 socket.close(); in assertBacklog()
|
/libcore/ojluni/src/main/java/java/net/ |
D | SocketOutputStream.java | 53 private Socket socket = null; field in SocketOutputStream 64 socket = impl.getSocket(); in SocketOutputStream() 173 if (socket != null) { in close() 174 if (!socket.isClosed()) in close() 175 socket.close(); in close()
|
D | AbstractPlainSocketImpl.java | 130 if (socket != null) in create() 131 socket.setCreated(); in create() 381 if (!closePending && (socket == null || !socket.isBound())) { in doConnect() 401 if (socket != null) { in doConnect() 402 socket.setBound(); in doConnect() 403 socket.setConnected(); in doConnect() 423 if (!closePending && (socket == null || !socket.isBound())) { in bind() 428 if (socket != null) in bind() 429 socket.setBound(); in bind()
|
D | DatagramSocketImpl.java | 60 DatagramSocket socket; field in DatagramSocketImpl 62 void setDatagramSocket(DatagramSocket socket) { in setDatagramSocket() argument 63 this.socket = socket; in setDatagramSocket() 67 return socket; in getDatagramSocket()
|
D | SocketInputStream.java | 55 private Socket socket = null; field in SocketInputStream 66 socket = impl.getSocket(); in SocketInputStream() 282 if (socket != null) { in close() 283 if (!socket.isClosed()) in close() 284 socket.close(); in close()
|
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/ |
D | HttpURLConnectionTest.java | 91 Socket socket = serverSocket.accept(); in run() local 92 socket.setSoTimeout(1000); in run() 94 int num = socket.getInputStream().read(buff); in run() 95 socket.getOutputStream().write(( in run() 99 num = socket.getInputStream().read(buff); in run() 102 socket = serverSocket.accept(); in run() 103 socket.setSoTimeout(1000); in run() 104 num = socket.getInputStream().read(buff); in run() 110 socket.getOutputStream().write(( in run()
|
/libcore/support/src/test/java/libcore/javax/net/ssl/ |
D | TestKeyManager.java | 62 public String chooseClientAlias(String[] keyTypes, Principal[] issuers, Socket socket) { in chooseClientAlias() argument 70 dumpSocket(socket); in chooseClientAlias() 72 return dumpAlias(keyManager.chooseClientAlias(keyTypes, issuers, socket)); in chooseClientAlias() 87 public String chooseServerAlias(String keyType, Principal[] issuers, Socket socket) { in chooseServerAlias() argument 93 dumpSocket(socket); in chooseServerAlias() 95 return dumpAlias(keyManager.chooseServerAlias(keyType, issuers, socket)); in chooseServerAlias() 98 private void dumpSocket(Socket socket) { in dumpSocket() argument 100 out.print(String.valueOf(socket)); in dumpSocket()
|
D | ForwardingX509ExtendedKeyManager.java | 38 public String chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket) { in chooseClientAlias() argument 39 return delegate.chooseClientAlias(keyType, issuers, socket); in chooseClientAlias() 43 public String chooseServerAlias(String keyType, Principal[] issuers, Socket socket) { in chooseServerAlias() argument 44 return delegate.chooseServerAlias(keyType, issuers, socket); in chooseServerAlias()
|
/libcore/luni/src/test/java/libcore/android/system/ |
D | OsTest.java | 113 final FileDescriptor fd = Os.socket(AF_INET, SOCK_DGRAM, 0); in testFcntlInt_udpSocket() 131 final FileDescriptor fd = Os.socket(AF_INET, SOCK_DGRAM, 0); in testFcntlInt_invalidCmd() 168 final FileDescriptor fd = Os.socket(AF_UNIX, SOCK_STREAM, 0); in testUnixDomainSocket_unnamed() 176 final FileDescriptor serverFd = Os.socket(AF_UNIX, SOCK_STREAM, 0); in checkUnixDomainSocket() 212 FileDescriptor clientFd = Os.socket(AF_UNIX, SOCK_STREAM, 0); in checkUnixDomainSocket() 318 final FileDescriptor serverFd = Os.socket(family, SOCK_STREAM, 0); in checkByteBufferPositions_sendto_recvfrom() 350 FileDescriptor clientFd = Os.socket(family, SOCK_STREAM, 0); in checkByteBufferPositions_sendto_recvfrom() 403 private static void expectBindException(FileDescriptor socket, SocketAddress addr, in expectBindException() argument 405 String msg = String.format("bind(%s, %s)", socket, addr); in expectBindException() 407 Os.bind(socket, addr); in expectBindException() [all …]
|