sendFile

suspend fun CoroutineSrtSocket.sendFile(file: File, offset: Long = 0, size: Long = file.length(), block: Int = 364000): Long

Sends a specified file.

See Also: srt_sendfile

Return

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

Parameters

file

the File to send

offset

the offset used to read file from

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