/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
H A D | SSLSessionContextTest.java | 25 SSLSessionContext sc = context 27 sc.setSessionCacheSize(10); 28 assertEquals("10 wasn't returned", 10, sc.getSessionCacheSize()); 29 sc.setSessionCacheSize(5); 30 assertEquals("5 wasn't returned", 5, sc.getSessionCacheSize()); 33 sc.setSessionCacheSize(-1); 49 SSLSessionContext sc = context 51 sc.setSessionTimeout(100); 52 assertEquals("100 wasn't returned", 100, sc.getSessionTimeout()); 53 sc [all...] |
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
H A D | SocketChannelTest.java | 52 SocketChannel sc = SocketChannel.open(ss.getLocalSocketAddress())) { 56 sc.read(readOnly); 61 sc.read(new ByteBuffer[] { readOnly }); 66 sc.read(new ByteBuffer[] { readOnly }, 0, 1); 75 SocketChannel sc = SocketChannel.open(); 76 sc.configureBlocking(false); 79 SelectionKey selectionKey = sc.register(selector, SelectionKey.OP_CONNECT); 87 sc.connect(new InetSocketAddress(InetAddress.getByAddress(new byte[] { 94 sc.finishConnect(); 104 SocketChannel sc [all...] |
H A D | SelectorTest.java | 42 SocketChannel sc = SocketChannel.open(); 43 sc.configureBlocking(false); 44 sc.connect(ssc.socket().getLocalSocketAddress()); 45 SelectionKey key = sc.register(selector, SelectionKey.OP_CONNECT); 48 sc.finishConnect(); 118 SocketChannel sc = SocketChannel.open(); 119 sc.connect(ssc.socket().getLocalSocketAddress()); 120 sc.finishConnect(); 123 sc.configureBlocking(false); 130 SelectionKey key = sc [all...] |
H A D | ServerSocketChannelTest.java | 172 ServerSocketChannel sc = ServerSocketChannel.open(); 173 sc.setOption(StandardSocketOptions.SO_REUSEADDR, true); 176 assertTrue(sc.getOption(StandardSocketOptions.SO_REUSEADDR)); 178 sc.setOption(StandardSocketOptions.SO_REUSEADDR, false); 181 assertEquals(false, (boolean)sc.getOption(StandardSocketOptions.SO_REUSEADDR)); 183 sc.setOption(StandardSocketOptions.SO_RCVBUF, 1100); 184 assertTrue(1100 <= sc.getOption(StandardSocketOptions.SO_RCVBUF)); 186 sc.close(); 188 sc.setOption(StandardSocketOptions.SO_RCVBUF, 2000);
|
H A D | OldSocketChannelTest.java | 302 SocketChannel sc = SocketChannel.open(); 303 sc.connect(ssc.socket().getLocalSocketAddress()); 307 sc.read(buf); 310 sc.read(buf); 311 sc.close(); 318 sc = SocketChannel.open(); 319 sc.connect(ssc.socket().getLocalSocketAddress()); 323 sc.read(buf); 326 sc.read(buf); 327 sc [all...] |
/libcore/ojluni/src/main/java/sun/nio/ch/ |
H A D | SocketAdaptor.java | 54 private final SocketChannelImpl sc; field in class:SocketAdaptor 59 private SocketAdaptor(SocketChannelImpl sc) throws SocketException { argument 60 super(new FileDescriptorHolderSocketImpl(sc.getFD())); 61 this.sc = sc; 64 public static Socket create(SocketChannelImpl sc) { argument 66 return new SocketAdaptor(sc); 73 return sc; 88 synchronized (sc.blockingLock()) { 89 if (!sc [all...] |
H A D | ServerSocketAdaptor.java | 100 SocketChannel sc = ssc.accept(); 101 if (sc == null && !ssc.isBlocking()) 103 return sc.socket(); 108 SocketChannel sc; 109 if ((sc = ssc.accept()) != null) 110 return sc.socket(); 117 if (result > 0 && ((sc = ssc.accept()) != null)) 118 return sc.socket();
|
H A D | ChannelInputStream.java | 57 SelectableChannel sc = (SelectableChannel)ch; 58 synchronized (sc.blockingLock()) { 59 boolean bm = sc.isBlocking(); 64 // sc.configureBlocking(block); 68 // sc.configureBlocking(bm);
|
H A D | FileDispatcher.java | 59 abstract boolean canTransferToDirectly(SelectableChannel sc); argument
|
H A D | PollArrayWrapper.java | 74 void addEntry(SelChImpl sc) { argument 75 putDescriptor(totalChannels, IOUtil.fdVal(sc.getFD()));
|
H A D | ServerSocketChannelImpl.java | 238 SocketChannel sc = null; 266 sc = new SocketChannelImpl(provider(), newfd, isa); 273 sc.close(); 277 return sc;
|
H A D | FileDispatcherImpl.java | 138 boolean canTransferToDirectly(java.nio.channels.SelectableChannel sc) { argument
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/spi/ |
H A D | AbstractSelectableChannelTest.java | 112 SocketChannel sc = SocketChannel.open(); 113 sc.configureBlocking(false); 114 SelectionKey acceptKey = sc.register(acceptSelector1, 118 assertSame(sc, acceptKey.channel()); 120 //test that sc.register invokes Selector.register() 121 acceptKey = sc.register(acceptSelector2, SelectionKey.OP_READ, null); 211 SocketChannel sc = SocketChannel.open(); 212 sc.configureBlocking(false); 214 sc.register(null, SelectionKey.OP_READ, argObj); 235 SocketChannel sc [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
H A D | SelectorTest.java | 116 SocketChannel sc = SocketChannel.open(); 117 sc.configureBlocking(false); 118 SelectionKey key3 = sc.register(selector, SelectionKey.OP_READ); 151 SocketChannel sc = SocketChannel.open(); 155 sc.connect(localAddress); 188 sc.close(); 337 SocketChannel sc = SocketChannel.open(); 338 sc.configureBlocking(false); 339 SelectionKey key2 = sc.register(selector, SelectionKey.OP_READ); 394 SocketChannel sc [all...] |
H A D | SelectionKeyTest.java | 36 SocketChannel sc; field in class:SelectionKeyTest 45 sc = SocketChannel.open(); 46 sc.configureBlocking(false); 47 selectionKey = sc.register(selector, SelectionKey.OP_CONNECT); 127 assertSame(sc, selectionKey.channel()); 130 assertSame(sc, selectionKey.channel()); 155 selectionKey.interestOps(~sc.validOps()); 188 sc.close(); 298 sc.connect(new InetSocketAddress(LOCAL_ADDR, ss.getLocalPort()));
|
H A D | SinkChannelTest.java | 468 SocketChannel sc = SocketChannel.open(); 471 sc.write(buf); 476 sc.connect(new InetSocketAddress(InetAddress.getLocalHost(), localPort)); 479 sc.close(); 481 sc.write(buf); 493 SocketChannel sc = SocketChannel.open(); 494 sc.connect(new InetSocketAddress(InetAddress.getLocalHost(), localPort)); 498 sc.write(buf,0,2); 503 sc.close();
|
H A D | SocketChannelTest.java | 211 SocketChannel sc = SocketChannel.open(); 212 assertNull(sc.socket().getLocalSocketAddress()); 215 sc.socket().bind(bindAddr); 217 assertNotNull(sc.socket().getLocalSocketAddress()); 219 sc.close(); 221 assertFalse(sc.isOpen()); 223 sc.socket().getLocalSocketAddress(); 2644 MockSocketChannel sc = new MockSocketChannel(null); 2649 sc.read(byteBufferArray); 2650 assertTrue(sc [all...] |
H A D | ChannelsTest.java | 598 SocketChannel sc = SocketChannel.open(); 599 sc.connect(ssc.socket().getLocalSocketAddress()); 600 sc.configureBlocking(false); 601 assertFalse(sc.isBlocking()); 605 assertFalse(sc.isBlocking()); 607 Reader reader = Channels.newReader(sc, "UTF16"); 615 Channels.newInputStream(sc).read(); 620 sc.close();
|
H A D | ServerSocketChannelTest.java | 667 ServerSocketChannel sc = ServerSocketChannel.open(); 669 sc.socket().bind(null); 672 sc.configureBlocking(false); 674 ServerSocket ss = sc.socket(); 685 SocketChannel client = sc.accept(); 690 sc.close();
|
/libcore/ojluni/src/main/java/java/nio/channels/ |
H A D | SocketChannel.java | 187 SocketChannel sc = open(); 189 sc.connect(remote); 192 sc.close(); 198 assert sc.isConnected(); 199 return sc;
|
H A D | Channels.java | 95 SelectableChannel sc = (SelectableChannel)ch; 96 synchronized (sc.blockingLock()) { 97 if (!sc.isBlocking())
|
/libcore/ojluni/src/test/java/net/Socket/ |
H A D | ShutdownInput.java | 58 try (ServerSocketChannel sc = ServerSocketChannel.open().bind(null); 60 new InetSocketAddress(iaddr, sc.socket().getLocalPort())); 61 SocketChannel s2 = sc.accept() ) {
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
H A D | SecureCacheResponseTest.java | 35 SecureCacheResponse sc = new MockCacheResponse(); 37 assertNull(sc.getCipherSuite());
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
H A D | PrintStreamTest.java | 243 char[] sc = new char[4000]; 244 fileString.getChars(0, fileString.length(), sc, 0); 245 os.print(sc); 413 char[] sc = new char[4000]; 414 fileString.getChars(0, fileString.length(), sc, 0); 415 os.println(sc);
|
/libcore/luni/src/test/java/libcore/java/io/ |
H A D | SerializationTest.java | 110 SerializableContainer1 sc = (SerializableContainer1) SerializationTester.deserializeHex(s); 111 assertNull(sc.unserializable); 154 // SerializableContainer2 sc = new SerializableContainer2(); 155 // sc.unserializable = new WasSerializable(); 156 // SerializationTester.serializeHex(sc);
|