diff asyncdreactor/protocol/Http11.d @ 11:5836613d16ac

reorg! reorg!
author rick@minifunk
date Tue, 12 Aug 2008 16:59:56 -0400
parents dreactor/protocol/Http11.d@e75a2e506b1d
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/asyncdreactor/protocol/Http11.d	Tue Aug 12 16:59:56 2008 -0400
@@ -0,0 +1,43 @@
+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); 
+    }
+
+    
+private
+    RawTCPListener listener;
+    Http11Parser parser;
+}
+
+class HttpClient
+{
+public
+    this(Vat sel)
+    {
+        client = new RawTCPClient(sel);
+        client.setDataHandler(&onData);
+    }
+
+    private int onData()
+    {
+        
+    }
+private
+    RawTCPClient client;
+}
+