Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef __INET_TCPSESSIONAPP_H
00015 #define __INET_TCPSESSIONAPP_H
00016
00017 #include <vector>
00018 #include <omnetpp.h>
00019 #include "TCPSocket.h"
00020
00021
00025 class INET_API TCPSessionApp : public cSimpleModule
00026 {
00027 protected:
00028 struct Command
00029 {
00030 simtime_t tSend;
00031 int numBytes;
00032 };
00033 typedef std::vector<Command> CommandVector;
00034 CommandVector commands;
00035
00036 TCPSocket socket;
00037
00038
00039 int packetsRcvd;
00040 long bytesRcvd;
00041 long bytesSent;
00042 int indicationsRcvd;
00043
00044 public:
00045 TCPSessionApp() : cSimpleModule(65536) {}
00046
00047 protected:
00048 virtual void parseScript(const char *script);
00049 virtual void waitUntil(simtime_t t);
00050 virtual void count(cMessage *msg);
00051
00052 virtual void activity();
00053 virtual void finish();
00054 };
00055
00056 #endif
00057
00058