File | Doc | Category | Size | Date | Package |
---|
BN.java | API Doc | Sun JDK 1.5.0 Example | 2632 | Sat Jan 08 15:08:43 GMT 2005 | None |
BNpublic class BN extends Server A Blocking/Multi-threaded Server which creates a new thread for each
connection. This is not efficient for large numbers of connections. |
Constructors Summary |
---|
BN(int port, int backlog, boolean secure)
super(port, backlog, secure);
|
Methods Summary |
---|
void | runServer()
for (;;) {
SocketChannel sc = ssc.accept();
ChannelIO cio = (sslContext != null ?
ChannelIOSecure.getInstance(
sc, true /* blocking */, sslContext) :
ChannelIO.getInstance(
sc, true /* blocking */));
RequestServicer svc = new RequestServicer(cio);
Thread th = new Thread(svc);
th.start();
}
|
|