Stupid winsock needs special way to close sockets.
[dftpd.git] / TelnetCommand.hpp
blobeeb36fca8317176f705bfdd479e1e27b55f20ab6
1 #ifndef __DFTPD__TELNETCOMMAND_HPP__
2 #define __DFTPD__TELNETCOMMAND_HPP__
4 #include <boost/shared_ptr.hpp>
5 #include "TelnetPtr.hpp"
7 class TelnetCommand
9 public:
10 TelnetCommand( const TelnetWPtr& parent );
11 ~TelnetCommand();
13 void Reset();
15 bool ParsingCommand() const { return m_buf[0] != 0; }
16 bool Parse( unsigned char byte );
18 private:
19 // RFC 854 specifies that commands are either 2 or 3 byte sequences.
20 unsigned char m_buf[3];
21 int m_byte;
23 TelnetWPtr m_parent;
26 typedef boost::shared_ptr<TelnetCommand> TelnetCommandPtr;
28 #endif