
  [;1m-spec sendfile(RawFile, Socket, Offset, Bytes, Opts) ->[0m
  [;1m                  {ok, non_neg_integer()} |[0m
  [;1m                  {error, inet:posix() | closed | badarg | not_owner}[0m
  [;1m                  when[0m
  [;1m                      RawFile :: fd(),[0m
  [;1m                      Socket :: inet:socket(),[0m
  [;1m                      Offset :: non_neg_integer(),[0m
  [;1m                      Bytes :: non_neg_integer(),[0m
  [;1m                      Opts :: [sendfile_option()].[0m

[;;4mSince[0m:
  OTP R15B

  Types:
    -type sendfile_option() ::
          {chunk_size, non_neg_integer()} | {use_threads, boolean()}.

  Sends [;;4mBytes[0m from the file referenced by [;;4mRawFile[0m beginning at [;;4m[0m
  [;;4mOffset[0m to [;;4mSocket[0m. Returns [;;4m{ok, BytesSent}[0m if successful,
  otherwise [;;4m{error, Reason}[0m. If [;;4mBytes[0m is set to [;;4m0[0m all data
  after the specified [;;4mOffset[0m is sent.

  The file used must be opened using the [;;4mraw[0m flag, and the process
  calling [;;4msendfile[0m must be the controlling process of the socket.
  See [;;4mgen_tcp:controlling_process/2[0m.

  If the OS used does not support non-blocking [;;4msendfile[0m, an Erlang
  fallback using [;;4mread/2[0m and [;;4mgen_tcp:send/2[0m is used.

  The option list can contain the following options:

  [;;4m[;;4mchunk_size[0m[0m:
    The chunk size used by the Erlang fallback to send data. If
    using the fallback, set this to a value that comfortably fits
    in the systems memory. Default is 20 MB.
