Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef UDPVIDEOSTREAMSVR_H
00024 #define UDPVIDEOSTREAMSVR_H
00025
00026 #include <vector>
00027 #include <omnetpp.h>
00028 #include "UDPAppBase.h"
00029
00030
00038 class INET_API UDPVideoStreamSvr : public UDPAppBase
00039 {
00040 public:
00044 struct VideoStreamData
00045 {
00046 IPvXAddress clientAddr;
00047 int clientPort;
00048 long videoSize;
00049 long bytesLeft;
00050 long numPkSent;
00051 };
00052
00053 protected:
00054 typedef std::vector<VideoStreamData *> VideoStreamVector;
00055 VideoStreamVector streamVector;
00056
00057
00058 int serverPort;
00059 cPar *waitInterval;
00060 cPar *packetLen;
00061 cPar *videoSize;
00062
00063
00064 unsigned int numStreams;
00065 unsigned long numPkSent;
00066
00067 protected:
00068
00069 virtual void processStreamRequest(cMessage *msg);
00070
00071
00072 virtual void sendStreamData(cMessage *timer);
00073
00074 public:
00075 UDPVideoStreamSvr();
00076 virtual ~UDPVideoStreamSvr();
00077
00078 protected:
00080
00081 virtual void initialize();
00082 virtual void finish();
00083 virtual void handleMessage(cMessage* msg);
00085 };
00086
00087
00088 #endif
00089
00090