summaryrefslogtreecommitdiff
path: root/xmake/modules/private/service/client.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-07-05 23:16:48 +0800
committerruki <[email protected]>2022-07-05 23:16:48 +0800
commitb1d48494ee6f4daaa6daae840c0bb2dd42ee64b6 (patch)
treef5503a7e109b4b1ff737b9836520602335881036 /xmake/modules/private/service/client.lua
parent7b87fb6a25edcf3cf3bef9b6d8f6098249f24fa3 (diff)
add recv/send timeout
Diffstat (limited to 'xmake/modules/private/service/client.lua')
-rw-r--r--xmake/modules/private/service/client.lua14
1 files changed, 10 insertions, 4 deletions
diff --git a/xmake/modules/private/service/client.lua b/xmake/modules/private/service/client.lua
index 92330fec4..4eb18d1a1 100644
--- a/xmake/modules/private/service/client.lua
+++ b/xmake/modules/private/service/client.lua
@@ -31,12 +31,18 @@ local client = client or object()
function client:init()
-- init timeout
- self._TIMEOUT = config.get("timeout") or -1
+ self._SEND_TIMEOUT = config.get("send_timeout") or -1
+ self._RECV_TIMEOUT = config.get("recv_timeout") or -1
end
--- get timeout
-function client:timeout()
- return self._TIMEOUT
+-- get send timeout
+function client:send_timeout()
+ return self._SEND_TIMEOUT
+end
+
+-- get recv timeout
+function client:recv_timeout()
+ return self._RECV_TIMEOUT
end
-- parse host address