Module elli_sendfile

Data Types

sendfile_opts()


  sendfile_opts() = [{chunk_size, non_neg_integer()}]
  

Function Index

sendfile/5Send part of a file on a socket.

Function Details

sendfile/5


  sendfile(RawFile::file:fd(), Socket::elli_tcp:socket(), Offset::non_neg_integer(), Bytes::non_neg_integer(), Opts::sendfile_opts()) -> {ok, non_neg_integer()} | {error, atom()}
  

Send part of a file on a socket.

Basically, @see file:sendfile/5 but for ssl (i.e. not raw OS sockets). Originally from https://github.com/ninenines/ranch/pull/41/files