rendered paste body#include <iostream>//#include "TestClient.h"#include "Switch.h"#include "Network.h"#include "EventQueue.h"#include "OnReceiveEvent.h"#include "FileSendClient.h"#include "FileSendServer.h"int main() { Network network; Switch switchA; network.add_node(&switchA); FileSendClient clientA; FileSendClient clientB; FileSendServer server; network.add_node(&clientA, &switchA); network.add_node(&clientB, &switchA); network.add_node(&server, &switchA); clientA.setDownstream(2 MBPS); clientA.setUpstream(256 KBPS); clientB.setDownstream(2 MBPS); clientB.setUpstream(256 KBPS); server.setDownstream(100 MBPS); server.setUpstream(100 MBPS); cout << "First scenario: Client A uploads a file to a website (such as YouSendIt(TM)) for Client B to then download.\n\n"; clientA.sendFile(server.getAddress(), 10 MiB); network.run(); clientB.getFile(server.getAddress()); network.run(); cout << "Time: " << network.getNeatTime() << "\n"; network.resetTime(); cout << "Scenario complete!\n\nSecond scenario: Client A sends a file straight to Client B using Peer To Peer technology.\n\n"; clientA.sendFile(clientB.getAddress(), 10 MiB); network.run(); cout << "Time: " << network.getNeatTime() << "\n"; cout << "Scenario complete!\n\n"; cout << "Fin.\n"; return 0;}