Skip to content

Commit 200286d

Browse files
committed
Implement Frame class with seqNum, data, and ack variables.
1 parent 6350d44 commit 200286d

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Selective Repeat Protocol/Frame.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* This code defines a header file. The Frame class has three member variables:
3+
* seqNum of type int to store the sequence number, data of type std::string to store data,
4+
* and ack of type bool to represent acknowledgment.
5+
* The class also includes a constructor that initializes the seqNum and data member variables.
6+
* The code is wrapped inside include guards to prevent multiple declarations when the header file is included in different source files.
7+
**/
8+
9+
10+
11+
#ifndef FRAME_H
12+
#define FRAME_H
13+
#include <string>
14+
15+
16+
class Frame {
17+
public:
18+
int seqNum;
19+
std::string data;
20+
bool ack;
21+
};
22+
23+
#endif

0 commit comments

Comments
 (0)