having a little trouble trying to convert this pseudo code into python, could any help
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
}