#ifndef _TCPDISPATCHER_
#define _TCPDISPATCHER_

#include "Dispatchers/dispatcher/dispatcher"
#include "netbuffer/netbuffer"
#include "httpbuffer/httpbuffer"
#include "ipstore/ipstore"

class TcpDispatcher: public Dispatcher {
public:

    TcpDispatcher (int fd, struct in_addr ip);

    virtual void execute();
    virtual void dispatch();
    virtual void handle();

    unsigned readchunk (int src);

    Httpbuffer &buf() 				{ return netbuffer; }

private:
    Httpbuffer netbuffer;			// same as netbuffer, but
    						// httpdispatcher reuses it
};

#endif
