TelnetApp.h

Go to the documentation of this file.
00001 //
00002 // Copyright 2004 Andras Varga
00003 //
00004 // This library is free software, you can redistribute it and/or modify
00005 // it under  the terms of the GNU Lesser General Public License
00006 // as published by the Free Software Foundation;
00007 // either version 2 of the License, or any later version.
00008 // The library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00011 // See the GNU Lesser General Public License for more details.
00012 //
00013 
00014 #ifndef __INET_TELNETAPP_H
00015 #define __INET_TELNETAPP_H
00016 
00017 #include "TCPGenericCliAppBase.h"
00018 
00019 
00023 class INET_API TelnetApp : public TCPGenericCliAppBase
00024 {
00025   protected:
00026     cMessage *timeoutMsg;
00027     int numLinesToType; // lines (commands) the user will type in this session
00028     int numCharsToType; // characters the user will type for current line (command)
00029 
00030   public:
00031     TelnetApp();
00032     virtual ~TelnetApp();
00033 
00034   protected:
00036     virtual void initialize();
00037 
00039     virtual void handleTimer(cMessage *msg);
00040 
00042     virtual void socketEstablished(int connId, void *yourPtr);
00043 
00045     virtual void socketDataArrived(int connId, void *yourPtr, cPacket *msg, bool urgent);
00046 
00048     virtual void socketClosed(int connId, void *yourPtr);
00049 
00051     virtual void socketFailure(int connId, void *yourPtr, int code);
00052 };
00053 
00054 #endif
00055 
00056