recvFile

suspend fun CoroutineSrtSocket.recvFile(file: File, offset: Long = 0, size: Long, block: Int = 7280000): Long

Receives a file. File is create in file.

See Also: srt_recvfile

Return

the size (>0) of the received data of a file.

Parameters

file

the File where to write received data

offset

the offset used to write file

size

the size of the file

block

the size of the single block to read at once before writing it to a file

See also

Throws

if it has failed to send message

if a timeout has been triggered