Mercurial > projects > dreactor
view dreactor/protocol/IProvider.d @ 13:8c9b1276f623 default tip
bug fixes
author | rick@minifunk |
---|---|
date | Sat, 20 Sep 2008 18:33:11 -0400 |
parents | d6a3cfe7c3de |
children |
line wrap: on
line source
module dreactor.protocol.IProvider; import tango.io.selector.model.ISelector; import tango.io.device.Conduit; struct Message { public int type; int info; void* payload; int from; bool valid; static Message opCall(void* buf, int t, int e, int f = 0) { Message m; m.type = t; m.info = e; m.from = f; m.payload = buf; m.valid = true; return m; } } interface IProvider { Message handleRead(); Message handleWrite(); Message handleError(); Message handleConnect(); Message handleDisconnect(); void send(char []); void setRegisterFunc(bool delegate (Event)); Conduit getConduit(); Event getEvents(); void setEvents(Event e); }