Google
Web alhem.net

InjectSocket.h

Go to the documentation of this file.
00001 #ifndef _INJECTSOCKET_H
00002 #define _INJECTSOCKET_H
00003 
00004 #include <HTTPSocket.h>
00005 #include <ISocketHandler.h>
00006 
00007 
00008 class InjectSocket : public HTTPSocket
00009 {
00010 public:
00011         InjectSocket(ISocketHandler& h);
00012         ~InjectSocket();
00013 
00014         void OnConnect();
00015         void OnAccept();
00016 
00017         void SetFilename(const std::string& x) { m_filename = x; }
00018 
00019         void OnFirst();
00020         void OnHeader(const std::string&,const std::string&);
00021         void OnHeaderComplete();
00022         void OnData(const char *,size_t);
00023 
00024 private:
00025         bool m_is_server;
00026         std::string m_filename;
00027         int m_content_length;
00028         FILE *m_file;
00029 };
00030 
00031 
00032 
00033 
00034 #endif // _INJECTSOCKET_H

Generated for Robot World by doxygen 1.3.6

Page, code, and content Copyright (C) 2004 by Anders Hedström