Mercurial > projects > dreactor
comparison dreactor/protocol/Http11.d @ 10:e75a2e506b1d
housekeeping
author | rick@minifunk |
---|---|
date | Fri, 01 Aug 2008 16:30:45 -0400 |
parents | 7a315154bf5e |
children |
comparison
equal
deleted
inserted
replaced
9:5412a1ff2e49 | 10:e75a2e506b1d |
---|---|
1 module dreactor.protocol.Http11.d; | 1 module dreactor.protocol.Http11; |
2 | 2 |
3 class Http | 3 import dreactor.protocol.RawTcp; |
4 import dreactor.protocol.http11_parser; | |
5 | |
6 class HttpListener | |
4 { | 7 { |
8 public | |
9 this(Vat sel, IPv4Address addr) | |
10 { | |
11 listener = new RawTCPListener(sel, IPv4Address addr); | |
12 parser = new Http11Parser(); | |
13 listener.setDataHandler(&onData); | |
14 } | |
15 | |
16 private int onData(char[] buffer) | |
17 { | |
18 parser.execute(buffer); | |
19 } | |
20 | |
21 | |
22 private | |
23 RawTCPListener listener; | |
24 Http11Parser parser; | |
5 } | 25 } |
26 | |
27 class HttpClient | |
28 { | |
29 public | |
30 this(Vat sel) | |
31 { | |
32 client = new RawTCPClient(sel); | |
33 client.setDataHandler(&onData); | |
34 } | |
35 | |
36 private int onData() | |
37 { | |
38 | |
39 } | |
40 private | |
41 RawTCPClient client; | |
42 } | |
43 |