Logo
~Sockets~
~Examples~
~Contact~


HttpDebugSocket.h

Go to the documentation of this file.
00001 
00004 /*
00005 Copyright (C) 2004-2007  Anders Hedström (grymse@alhem.net)
00006 
00007 This library is made available under the terms of the GNU GPL.
00008 
00009 If you would like to use this library in a closed-source application,
00010 a separate license agreement is available. For information about 
00011 the closed-source license agreement for the C++ sockets library,
00012 please visit http://www.alhem.net/Sockets/license.html and/or
00013 email license@alhem.net.
00014 
00015 This program is free software; you can redistribute it and/or
00016 modify it under the terms of the GNU General Public License
00017 as published by the Free Software Foundation; either version 2
00018 of the License, or (at your option) any later version.
00019 
00020 This program is distributed in the hope that it will be useful,
00021 but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 GNU General Public License for more details.
00024 
00025 You should have received a copy of the GNU General Public License
00026 along with this program; if not, write to the Free Software
00027 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00028 */
00029 #ifndef _SOCKETS_HttpDebugSocket_H
00030 #define _SOCKETS_HttpDebugSocket_H
00031 
00032 #include "sockets-config.h"
00033 #include "HTTPSocket.h"
00034 
00035 #ifdef SOCKETS_NAMESPACE
00036 namespace SOCKETS_NAMESPACE {
00037 #endif
00038 
00039 class ISocketHandler;
00040 
00044 class HttpDebugSocket : public HTTPSocket
00045 {
00046 public:
00047         HttpDebugSocket(ISocketHandler&);
00048         ~HttpDebugSocket();
00049 
00050         void Init();
00051 
00052         void OnFirst();
00053         void OnHeader(const std::string& key,const std::string& value);
00054         void OnHeaderComplete();
00055         void OnData(const char *,size_t);
00056 
00057 private:
00058         HttpDebugSocket(const HttpDebugSocket& s) : HTTPSocket(s) {} // copy constructor
00059         HttpDebugSocket& operator=(const HttpDebugSocket& ) { return *this; } // assignment operator
00060         int m_content_length;
00061         int m_read_ptr;
00062 };
00063 
00064 
00065 #ifdef SOCKETS_NAMESPACE
00066 }
00067 #endif
00068 
00069 #endif // _SOCKETS_HttpDebugSocket_H
Page, code, and content Copyright (C) 2007 by Anders Hedström
Generated for C++ Sockets by  doxygen 1.4.4