view 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 source

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;
}