I want to simulate a simple packet communication using C++. I want to implement a simple topology in which a transmitter creates a packet and sends it. A receiver receives the packet and sends a feedback/acknowledgement (ACK) to transmitter.
Simply create a transmitter class, receiver class, and packet class. You will achieve channel condition and delay by including a method for queues and calculating the time taken by each packet based on packet size, link bandwidths, and queue length.
The initial request should be made using TCP, so as to confirm delivery of the packet request through an acknowledgment from the other node, before it starts the UDP transmission.