+ elseif nixio.splice and not fd:is_tls_socket() and ftype == "fifo" then
+ splicable = true
+ end
+ end
+
+ if nixio.splice and fd:is_file() and not splicable then
+ splicable = not self:is_tls_socket() and fd:stat("type") == "fifo"
+ end
+
+ if splicable then
+ repeat
+ lsent, code, msg = nixio.splice(self, fd, size or ZIOBLKSIZE)
+ if lsent then
+ sent = sent + lsent
+ size = size and (size - lsent)
+ end
+ until (not lsent or lsent == 0 or (size and size == 0))
+ if lsent or (not lsent and sent == 0 and
+ code ~= nixio.const.ENOSYS and code ~= nixio.const.EINVAL) then
+ return lsent and sent, code, msg, sent
+ end