File | Doc | Category | Size | Date | Package |
---|
N1.java | API Doc | Sun JDK 1.5.0 Example | 2485 | Sat Jan 08 15:08:43 GMT 2005 | None |
N1public class N1 extends Server A non-blocking/single-threaded server. All accept() and
read()/write() operations are performed by a single thread, but only
after being selected for those operations by a Selector. |
Constructors Summary |
---|
N1(int port, int backlog, boolean secure)
super(port, backlog, secure);
ssc.configureBlocking(false);
|
Methods Summary |
---|
void | runServer()
Dispatcher d = new Dispatcher1();
d.register(ssc, SelectionKey.OP_ACCEPT,
new AcceptHandler(ssc, d, sslContext));
d.run();
|
|