Debian Codegraph @

protolib/src/sim/ns/tcp/TCPData.h

raw
1 #ifndef _TCPDATA
2 #define _TCPDATA
3
4 /*
5 * TcpData.h
6 *
7 * Created by Ian Taylor on 28/12/2006.
8 *
9 * A simple class to package our data up in the Application interface for ns-2
10 */
11
12
13 #include "ns-process.h"
14 #include "SimpleList.h"
15
16 #include "protoDebug.h"
17
18 class TcpData : public AppData, public ListItem {
19 private:
20 int size_;
21 char* bytes_;
22 public:
23 TcpData() : AppData(TCPAPP_STRING), size_(0), bytes_(NULL) {}
24
25 virtual ~TcpData();
26
27 void setData(const char* s, int size);
28
29 char* getData() { return bytes_; }
30 int getDataSize() { return size_; }
31
32 virtual AppData* copy();
33 };
34
35 #endif