1 /** \file HttpDebugSocket.h
5 Copyright (C) 2004-2007 Anders Hedström (grymse@alhem.net)
7 This library is made available under the terms of the GNU GPL.
9 If you would like to use this library in a closed-source application,
10 a separate license agreement is available. For information about
11 the closed-source license agreement for the C++ sockets library,
12 please visit http://www.alhem.net/Sockets/license.html and/or
13 email license@alhem.net.
15 This program is free software; you can redistribute it and/or
16 modify it under the terms of the GNU General Public License
17 as published by the Free Software Foundation; either version 2
18 of the License, or (at your option) any later version.
20 This program is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 GNU General Public License for more details.
25 You should have received a copy of the GNU General Public License
26 along with this program; if not, write to the Free Software
27 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 #ifndef _SOCKETS_HttpDebugSocket_H
30 #define _SOCKETS_HttpDebugSocket_H
32 #include "sockets-config.h"
33 #include "HTTPSocket.h"
35 #ifdef SOCKETS_NAMESPACE
36 namespace SOCKETS_NAMESPACE
{
41 /** HTTP request "echo" class. This class echoes a http request/body
42 with a html formatted page.
44 class HttpDebugSocket
: public HTTPSocket
47 HttpDebugSocket(ISocketHandler
&);
53 void OnHeader(const std::string
& key
,const std::string
& value
);
54 void OnHeaderComplete();
55 void OnData(const char *,size_t);
58 HttpDebugSocket(const HttpDebugSocket
& s
) : HTTPSocket(s
) {} // copy constructor
59 HttpDebugSocket
& operator=(const HttpDebugSocket
& ) { return *this; } // assignment operator
65 #ifdef SOCKETS_NAMESPACE
69 #endif // _SOCKETS_HttpDebugSocket_H