
/*---------------------------------------------------------------------------*/
/* webserver_static_file.h                                                   */
/* copyright (c) innovaphone 2016                                            */
/*                                                                           */
/*---------------------------------------------------------------------------*/

// This is the base class used by all webserver message handlers.
class WebserverStaticFile: public UWebserverGet {
protected:
    httpfile * const staticFile;
    byte * dataBuffer;
    ulong64 dataSize;
    ulong64 bytesSend;

    void SendNextPart(IWebserverGet * const webserverGet);

public:
    WebserverStaticFile(httpfile * const staticFile);
    virtual ~WebserverStaticFile();

    virtual void WebserverGetRequestAcceptComplete(IWebserverGet * const webserverGet);
    virtual void WebserverGetSendResult(IWebserverGet * const webserverGet);
    virtual void WebserverGetCloseComplete(IWebserverGet * const webserverGet);
    virtual void WebserverGetConnectionShutdownComplete(IWebserverGet * const webserverGet);
};