view dreactor/protocol/Http11.d @ 13:8c9b1276f623 default tip

bug fixes
author rick@minifunk
date Sat, 20 Sep 2008 18:33:11 -0400
parents e75a2e506b1d
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;
}