Searched refs:sc (Results 1 - 25 of 164) sorted by relevance

1234567

/openjdk7/jdk/test/java/nio/channels/SocketChannel/
H A DSocketOptionTests.java39 static void checkOption(SocketChannel sc, SocketOption name, Object expectedValue) argument
42 Object value = sc.getOption(name);
48 SocketChannel sc = SocketChannel.open();
51 Set<SocketOption<?>> options = sc.supportedOptions();
60 int linger = sc.<Integer>getOption(SO_LINGER);
63 checkOption(sc, SO_KEEPALIVE, false);
64 checkOption(sc, TCP_NODELAY, false);
67 sc.setOption(SO_KEEPALIVE, true);
68 checkOption(sc, SO_KEEPALIVE, true);
69 sc
[all...]
H A DBufferSize.java35 ServerSocketChannel sc = ServerSocketChannel.open();
37 sc.socket().setReceiveBufferSize(-1);
43 sc.socket().setReceiveBufferSize(0);
48 sc.close();
H A DLocalAddress.java47 SocketChannel sc = SocketChannel.open();
49 sc.connect(saddr);
50 InetAddress ia = sc.socket().getLocalAddress();
54 sc.close();
58 sc = SocketChannel.open();
60 sc.socket().bind(new InetSocketAddress(0));
61 if (sc.socket().getLocalPort() == 0)
63 sc.socket().connect(saddr);
64 InetAddress ia = sc.socket().getLocalAddress();
68 sc
[all...]
H A DConnectState.java69 abstract String go(SocketChannel sc) throws Exception; argument
76 static void check(SocketChannel sc, int state) throws Exception { argument
79 check(!sc.isConnected(), "!isConnected");
80 check(!sc.isConnectionPending(), "!isConnectionPending");
81 check(sc.isOpen(), "isOpen");
84 check(!sc.isConnected(), "!isConnected");
85 check(sc.isConnectionPending(), "isConnectionPending");
86 check(sc.isOpen(), "isOpen");
89 check(sc.isConnected(), "isConnected");
90 check(!sc
[all...]
H A DStream.java41 SocketChannel sc = SocketChannel.open();
42 sc.connect(isa);
43 sc.configureBlocking(false);
44 InputStream is = sc.socket().getInputStream();
52 sc.close();
H A DShutdown.java59 SocketChannel sc;
60 sc = SocketChannel.open(remote);
63 sc.shutdownInput();
64 sc.shutdownOutput();
66 sc.close();
70 sc = SocketChannel.open(remote);
73 boolean before = sc.socket().isInputShutdown();
74 sc.socket().shutdownInput();
75 boolean after = sc.socket().isInputShutdown();
78 sc
[all...]
H A DTrivial.java34 SocketChannel sc = SocketChannel.open();
37 if (sc.keyFor(sel) != null)
39 sc.configureBlocking(false);
40 SelectionKey sk = sc.register(sel, SelectionKey.OP_READ, args);
41 if (sc.keyFor(sel) != sk)
42 throw new Exception("keyFor returned " + sc.keyFor(sel));
55 sc.close();
H A DBasic.java43 SocketChannel sc = SocketChannel.open(isa);
44 out.println("opened: " + sc);
46 out.println("opts: " + sc.options());
47 ((SocketOpts.IP.TCP)sc.options())
57 out.println(" " + sc.options());
59 // sc.connect(isa);
60 out.println("connected: " + sc);
62 int n = sc.read(bb);
67 sc.socket().shutdownInput();
68 out.println("ishut: " + sc);
[all...]
H A DFinishConnect.java58 SocketChannel sc = SocketChannel.open();
59 sc.configureBlocking(false);
60 boolean connected = sc.connect(isa);
64 sc.connect(isa);
71 sc.configureBlocking(true);
75 sc.register(selector, SelectionKey.OP_CONNECT);
85 connected = sc.finishConnect();
96 connected = sc.finishConnect();
103 bytesRead = sc.read(bb);
113 sc
[all...]
H A DConnect.java56 SocketChannel sc;
60 sc = SocketChannel.open();
61 sc.configureBlocking(false);
64 sk = sc.register(selector, SelectionKey.OP_CONNECT);
65 if (sc.connect(isa)) {
67 sc.close();
92 if(sc.finishConnect()) {
93 if(sc.isConnected()) {
96 sc.write(buf);
107 sc
[all...]
/openjdk7/jdk/test/java/nio/channels/Selector/
H A DSelectAfterRead.java46 SocketChannel sc = SocketChannel.open();
47 sc.connect(new InetSocketAddress(lh, server.port()));
48 sc.read(ByteBuffer.allocate(1));
49 sc.configureBlocking(false);
50 sc.register(sel, SelectionKey.OP_READ);
55 sc.close();
63 sc = SocketChannel.open();
64 sc.connect(new InetSocketAddress(lh, server.port()));
65 sc.configureBlocking(false);
67 sc
[all...]
H A DReadAfterConnect.java42 SocketChannel sc = SocketChannel.open();
43 sc.connect(isa);
44 sc.configureBlocking(false);
45 sc.register(sel, SelectionKey.OP_READ);
49 sc.close();
H A DSelectWrite.java44 SocketChannel sc = SocketChannel.open();
45 sc.connect(isa);
46 sc.configureBlocking(false);
47 sc.register(sel, SelectionKey.OP_WRITE);
53 sc.close();
H A DClose.java37 SocketChannel sc = SocketChannel.open();
38 sc.configureBlocking(false);
39 SelectionKey sk = sc.register(sa, SelectionKey.OP_READ);
40 sc.register(sb, SelectionKey.OP_READ);
41 sc.keyFor(sa).cancel();
43 sc.close();
H A DLotsOfUpdates.java30 SocketChannel sc = SocketChannel.open();
31 sc.configureBlocking(false);
32 SelectionKey key = sc.register(sel, 0);
H A DAlias.java56 SocketChannel sc = SocketChannel.open();
57 sc.configureBlocking(false);
58 boolean result = sc.connect(isa);
63 SelectionKey key = sc.register(selector,
80 read(sc);
85 static void read(SocketChannel sc) throws Exception { argument
89 n = sc.read(bb);
94 sc.close();
H A DConnect.java56 SocketChannel sc = SocketChannel.open();
57 sc.configureBlocking(false);
58 boolean connected = sc.connect(isa);
61 SelectionKey RKey = sc.register (RSelector, SelectionKey.OP_CONNECT);
77 readAndClose(sc);
81 static void readAndClose(SocketChannel sc) throws Exception { argument
85 n = sc.read(bb);
90 sc.close();
H A DHelperSlowToDie.java50 SocketChannel sc = SocketChannel.open();
51 sc.configureBlocking(false);
52 sc.register(sel, SelectionKey.OP_CONNECT);
53 channels[i] = sc;
70 SocketChannel sc = SocketChannel.open();
71 sc.configureBlocking(false);
72 sc.register(sel, SelectionKey.OP_CONNECT);
74 sc.close();
H A DKeysReady.java40 SocketChannel sc = SocketChannel.open();
41 sc.configureBlocking(false);
42 sc.connect(isa);
47 SelectionKey key = sc.register(selector, SelectionKey.OP_CONNECT);
56 sc.close();
/openjdk7/jdk/src/share/sample/nio/server/
H A DChannelIO.java58 protected SocketChannel sc; field in class:ChannelIO
68 protected ChannelIO(SocketChannel sc, boolean blocking) argument
70 this.sc = sc;
71 sc.configureBlocking(blocking);
74 static ChannelIO getInstance(SocketChannel sc, boolean blocking) argument
76 ChannelIO cio = new ChannelIO(sc, blocking);
83 return sc;
134 return sc.read(requestBB);
148 return sc
[all...]
H A DB1.java59 SocketChannel sc = ssc.accept();
63 sc, true /* blocking */, sslContext) :
65 sc, true /* blocking */));
/openjdk7/jdk/src/share/classes/sun/nio/ch/
H A DSocketAdaptor.java57 private final SocketChannelImpl sc; field in class:SocketAdaptor
62 private SocketAdaptor(SocketChannelImpl sc) throws SocketException { argument
64 this.sc = sc;
67 public static Socket create(SocketChannelImpl sc) { argument
69 return new SocketAdaptor(sc);
76 return sc;
91 synchronized (sc.blockingLock()) {
92 if (!sc.isBlocking())
98 sc
[all...]
/openjdk7/jdk/src/share/classes/sun/reflect/generics/tree/
H A DClassSignature.java36 ClassTypeSignature sc,
39 superclass = sc;
44 ClassTypeSignature sc,
46 return new ClassSignature(ftps, sc, sis);
35 ClassSignature(FormalTypeParameter[] ftps, ClassTypeSignature sc, ClassTypeSignature[] sis) argument
43 make(FormalTypeParameter[] ftps, ClassTypeSignature sc, ClassTypeSignature[] sis) argument
/openjdk7/jdk/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/
H A DLargePacket.java88 SocketChannel sc = ssc.accept();
91 while (!sc.finishConnect() ) {
96 handshaking(ssle, sc);
99 receive(ssle, sc);
102 deliver(ssle, sc);
105 sc.close();
127 SocketChannel sc = SocketChannel.open();
128 sc.configureBlocking(false);
131 sc.connect(isa);
134 while (!sc
[all...]
/openjdk7/jdk/test/com/sun/nio/sctp/SctpChannel/
H A DSocketOptionTests.java50 <T> void checkOption(SctpChannel sc, SctpSocketOption<T> name, argument
52 T value = sc.getOption(name);
57 <T> void optionalSupport(SctpChannel sc, SctpSocketOption<T> name, argument
60 sc.setOption(name, value);
61 checkOption(sc, name, value);
76 SctpChannel sc = SctpChannel.open();
79 Set<SctpSocketOption<?>> options = sc.supportedOptions();
92 sc.setOption(SCTP_INIT_MAXSTREAMS, streams);
93 checkOption(sc, SCTP_INIT_MAXSTREAMS, streams);
94 streams = sc
[all...]

Completed in 1654 milliseconds

1234567