Can anyone please help me to convert the Pseudo code to python code?
receiveFile () {
lastblock := 0
newblock := 0 ;
repeat
repeat
event := getFrameFromUDP(m) ;
case event of
data : newblock := getBlockNoFromFrame(m) ;
transmitAckOverUDP(newblock) |
timeout: transmitAckOverUDP(lastblock)
esac
until newblock==lastblock+1 ;
lastblock = newblock ;
storeFrameInMemory(m)
until frame size < 512 bytes
}
mile_1 0 Newbie Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.