-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cpp
More file actions
25 lines (20 loc) · 763 Bytes
/
Main.cpp
File metadata and controls
25 lines (20 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/**
* This code includes the "GoBackN.h" header file, defines the main() function,
* prompts the user to enter a window size, creates an instance of the GoBackN class with the specified window size,
* and then simulates the sender and receiver sides of the Go-Back-N protocol.
**/
#include "GoBackN.h"
using namespace std;
int main() {
int window_size;
cout << "\n******************************************************************\n";
cout << "---> Enter the window size: ";
cin >> window_size;
GoBackN gb(window_size);
cout << "---> Sender side:\n";
gb.sender();
cout << "---> \nReceiver side:\n";
gb.receiver();
return 0;
cout << "\n******************************************************************\n";
}