TCPGenericSrvApp.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_TCPGENERICSRVAPP_H
00015 #define __INET_TCPGENERICSRVAPP_H
00016 
00017 #include <omnetpp.h>
00018 #include "INETDefs.h"
00019 
00020 
00021 
00028 class INET_API TCPGenericSrvApp : public cSimpleModule
00029 {
00030   protected:
00031     simtime_t delay;
00032     simtime_t maxMsgDelay;
00033 
00034     long msgsRcvd;
00035     long msgsSent;
00036     long bytesRcvd;
00037     long bytesSent;
00038 
00039   protected:
00040     virtual void sendBack(cMessage *msg);
00041     virtual void sendOrSchedule(cMessage *msg, simtime_t delay);
00042 
00043   protected:
00044     virtual void initialize();
00045     virtual void handleMessage(cMessage *msg);
00046     virtual void finish();
00047 };
00048 
00049 #endif
00050 
00051