Description: UDP实现可靠数据传输。使用GBN算法,实现了:1.随即丢包(随机数产生器Math.random()) 2.丢包后遇冗余ack重传 3.超时重传 (DatagramSocket和Socket都有成员函数setSoTimeout(delay),通过捕获超时时抛出的IO异常来实现超时重传)-Reliable UDP data transfer. GBN algorithm used to realize: 1. Then packet loss (random number generator Math.random ()) 2. After the case of redundant packet loss retransmission ack 3. Retransmission timeout (DatagramSocket and Socket has a member function setSoTimeout ( delay), by capturing the IO exception thrown during timeout to achieve retransmission timeout) Platform: |
Size: 10240 |
Author:nazali |
Hits: