mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
use async dns resolve in httpc, and dns resolve cache by ttl. see about issue #253
This commit is contained in:
@@ -3,6 +3,7 @@ local httpc = require "http.httpc"
|
||||
local dns = require "dns"
|
||||
|
||||
skynet.start(function()
|
||||
httpc.dns() -- set dns server
|
||||
print("GET baidu.com")
|
||||
local respheader = {}
|
||||
local status, body = httpc.get("baidu.com", "/", respheader)
|
||||
|
||||
Reference in New Issue
Block a user