08-02-2012, 01:16 PM
computer networks
[attachment=17283]
UDP transmission is different from TCP transmission in that:
1.UDP transmission is unidirectional; information is sent only from the source to the destination, and the absence of feedback from the receiver prevents the sender from knowing whether the transmitted segments arrived successfully in order. In other words, retransmission is not supported.
2.UDP does not provide any means of reliability or congestion control. There’s no concept of acknowledgement and retransmission timer. What arrives is simply what the receiver gets.
Explanation for Simulator.run()
The only thing changed in the simulator.run() function is the addition of the UDP sender and receiver functions.
•An additional array is created to store the UDP segments.
•When the TCP Sender is called, the UDP sender is called next.
•When the router is called, the UDP segments along with the TCP segments are sent to the function.
•Lastly, when the TCP Receiver is called, the UDP receiver is called next.
Explanation for UDPSender.send()
The UDPSenderclass has two variables, RTTand sendMode.
•RTTkeeps track of the number of iterations.
•sendModeis 1 when the UDP Sender is sending packets and is 0 when the UDP Sender is not sending packets (off mode).The UDP Sender has two options:
•If sendModeis 1 then it initializes the array of UDP segments to the number of packets selected by the user.
•If sendModeis 0 then it increases the RTT by 1.In order to identify whether or not sendModeis 1 or 0, we use a modulus of two times sendModeduration.