Mercurial > projects > dreactor
diff dreactor/protocol/Http11.d @ 10:e75a2e506b1d
housekeeping
author | rick@minifunk |
---|---|
date | Fri, 01 Aug 2008 16:30:45 -0400 |
parents | 7a315154bf5e |
children |
line wrap: on
line diff
--- a/dreactor/protocol/Http11.d Sat Jul 12 10:42:41 2008 -0400 +++ b/dreactor/protocol/Http11.d Fri Aug 01 16:30:45 2008 -0400 @@ -1,5 +1,43 @@ -module dreactor.protocol.Http11.d; +module dreactor.protocol.Http11; + +import dreactor.protocol.RawTcp; +import dreactor.protocol.http11_parser; + +class HttpListener +{ +public + this(Vat sel, IPv4Address addr) + { + listener = new RawTCPListener(sel, IPv4Address addr); + parser = new Http11Parser(); + listener.setDataHandler(&onData); + } + + private int onData(char[] buffer) + { + parser.execute(buffer); + } -class Http + +private + RawTCPListener listener; + Http11Parser parser; +} + +class HttpClient { +public + this(Vat sel) + { + client = new RawTCPClient(sel); + client.setDataHandler(&onData); + } + + private int onData() + { + + } +private + RawTCPClient client; } +