
  -spec sendfile(Filename, Socket) ->
                    {ok, non_neg_integer()} |
                    {error, inet:posix() | closed | badarg | not_owner}
                    when
                        Filename :: name_all(),
                        Socket ::
                            inet:socket() |
                            socket:socket() |
                            fun((iolist()) ->
                                    ok | {error, inet:posix() | closed}).

Since:
  OTP R15B

  Sends the file Filename to Socket. Returns {ok, BytesSent}
  if successful, otherwise {error, Reason}.
