From 8bfbf6b7fb255cda1bfd3d970c7442ed0941104c Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 28 Oct 2019 22:40:27 +0800 Subject: add sendfile demo --- xmake/core/base/socket.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'xmake/core/base/socket.lua') diff --git a/xmake/core/base/socket.lua b/xmake/core/base/socket.lua index 0dfae075b..47c358599 100644 --- a/xmake/core/base/socket.lua +++ b/xmake/core/base/socket.lua @@ -246,6 +246,7 @@ function _instance:sendfile(file, opt) local errors = nil if opt.block then while start < last do + -- TODO pass file/handle, improve block send real, errors = io.socket_sendfile(self._SOCK, file, start, last) if real > 0 then send = send + real -- cgit v1.3.1