Mercurial > projects > dreactor
diff dreactor/core/Vat.d @ 9:5412a1ff2e49
adding chat client and more updates
author | rick@minifunk |
---|---|
date | Sat, 12 Jul 2008 10:42:41 -0400 |
parents | 60cf25102fb2 |
children |
line wrap: on
line diff
--- a/dreactor/core/Vat.d Wed Jul 09 00:56:21 2008 -0400 +++ b/dreactor/core/Vat.d Sat Jul 12 10:42:41 2008 -0400 @@ -59,6 +59,11 @@ running = false; } + void wait() + { + thread.join(); + } + bool addConnection(Dispatcher handler) { log.trace("adding handler"); @@ -126,7 +131,7 @@ //add Conduits to listener freshList.processAll( (ref Dispatcher h) { - selector.reregister(h.transport, h.events(), h); + selector.register(h.transport, h.events(), h); return 1; }); remList.processAll( (ref Dispatcher h) @@ -145,8 +150,7 @@ { case CLOSE: s.unregister(h.transport); - (cast (AsyncSocketConduit) h.transport).shutdown(); - (cast (AsyncSocketConduit) h.transport).detach(); + h.transport.detach(); break; case UNREGISTER: s.unregister(h.transport); @@ -158,7 +162,7 @@ s.register(h.transport, h.events(), h); break; case REREGISTER: - s.reregister(h.transport, h.events(), h); + s.register(h.transport, h.events(), h); break; default: log.error("processReturn: unknown return value");