#ifndef _TCPDISPATCHER_
#define _TCPDISPATCHER_

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

class TcpDispatcher: public Dispatcher {
public:
    TcpDispatcher(Socket &clientsock): Dispatcher(clientsock), netbuffer() {}    	

    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
