mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 19:43:09 +00:00
suppot httpc.timeout
This commit is contained in:
@@ -4,6 +4,7 @@ local dns = require "dns"
|
||||
|
||||
skynet.start(function()
|
||||
httpc.dns() -- set dns server
|
||||
httpc.timeout = 100 -- set timeout 1 second
|
||||
print("GET baidu.com")
|
||||
local respheader = {}
|
||||
local status, body = httpc.get("baidu.com", "/", respheader)
|
||||
|
||||
Reference in New Issue
Block a user