Dolda2000 GitWeb
/
jagi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Configure channel blocking as part of adding to the event-loop.
[jagi.git]
/
src
/
jagi
/
scgi
/
EventServer.java
diff --git
a/src/jagi/scgi/EventServer.java
b/src/jagi/scgi/EventServer.java
index
1a6bc2a
..
2de2e86
100644
(file)
--- a/
src/jagi/scgi/EventServer.java
+++ b/
src/jagi/scgi/EventServer.java
@@
-21,11
+21,6
@@
public class EventServer implements Runnable {
tgt -> new Thread(tgt, "Request handler thread"));
public EventServer(ServerSocketChannel sk, Function handler) {
tgt -> new Thread(tgt, "Request handler thread"));
public EventServer(ServerSocketChannel sk, Function handler) {
- try {
- sk.configureBlocking(false);
- } catch(IOException e) {
- throw(new RuntimeException(e));
- }
this.sk = sk;
this.handler = handler;
}
this.sk = sk;
this.handler = handler;
}
@@
-431,11
+426,8
@@
public class EventServer implements Runnable {
public int events() {return(SelectionKey.OP_ACCEPT);}
public void handle(int events) throws IOException {
public int events() {return(SelectionKey.OP_ACCEPT);}
public void handle(int events) throws IOException {
- if((events & SelectionKey.OP_ACCEPT) != 0) {
- SocketChannel cl = sk.accept();
- cl.configureBlocking(false);
- Driver.current().add(new Client(cl));
- }
+ if((events & SelectionKey.OP_ACCEPT) != 0)
+ Driver.current().add(new Client(sk.accept()));
}
public void close() {
}
public void close() {