aboutsummaryrefslogtreecommitdiff
path: root/elymas
diff options
context:
space:
mode:
authorDrahflow <drahflow@gmx.de>2014-12-26 21:50:20 +0100
committerDrahflow <drahflow@gmx.de>2014-12-26 21:50:20 +0100
commit65e109986246b98f0d49bac32eeef16c6fabea83 (patch)
treec9568de7122db34dea15c8ef1dfe70fc980de1ce /elymas
parent2016623c77f7b0b4c0ce9e0724722aafd96282b4 (diff)
Allow write during accept
Diffstat (limited to 'elymas')
-rw-r--r--elymas/lib/net/alg/server.ey13
1 files changed, 10 insertions, 3 deletions
diff --git a/elymas/lib/net/alg/server.ey b/elymas/lib/net/alg/server.ey
index 39e42fb..2b291a7 100644
--- a/elymas/lib/net/alg/server.ey
+++ b/elymas/lib/net/alg/server.ey
@@ -41,6 +41,9 @@
{
listenFd +:acceptFd +??io.net.accept ==fd
+ noHandler ==eventHandler
+ ++EPOLLIN ++EPOLLERR bor ==initialFlags
+
<
{
epoll ++EPOLLCTLDEL fd 0 0 ++ctl +??io.net.epoll --
@@ -58,11 +61,15 @@
|close < =*close > +???io.net.con.write
} /write deff
{ ==flags
- epoll ++EPOLLCTLMOD fd flags eventHandler +!rawAddress ++ctl +??io.net.epoll --
+ eventHandler +!rawAddress noHandler +!rawAddress eq {
+ flags =initialFlags
+ } {
+ epoll ++EPOLLCTLMOD fd flags eventHandler +!rawAddress ++ctl +??io.net.epoll --
+ } ? *
} /ctl deffst
- > ::accept ==eventHandler
+ > ::accept =eventHandler
- epoll ++EPOLLCTLADD fd ++EPOLLIN ++EPOLLERR bor eventHandler +!rawAddress ++ctl +??io.net.epoll --
+ epoll ++EPOLLCTLADD fd initialFlags eventHandler +!rawAddress ++ctl +??io.net.epoll --
eventHandler fd protectGC
} =*in
{ "unexpected output capability on listening socket" die } =*out