:start sockread &bvar %x = $sock(sockname).rcvd if (%x == %THEFILESIZE) { code etc } else { goto start }