fix: httpc支持ipv6 (#2125)

* fix: httpc支持ipv6

* httpc ip:port解析放在c层

* lua-socket.c listen增加ip:port字符串解析, 相关cluster代码修改 #2124

* socketchannel changehost port可置空

* socketchannel changehost恢复port判空

* httpc解析域名加端口号逻辑优化

* 注释中字符串模式内容格式优化

---------

Co-authored-by: zhuyin.zhu <zhuyin.zhu@bytedance.com>
This commit is contained in:
IAN.Z
2025-12-27 17:11:52 +08:00
committed by GitHub
parent 1bbdeb3132
commit bed435660e
7 changed files with 41 additions and 39 deletions

View File

@@ -39,10 +39,10 @@ function gateserver.start(handler)
function CMD.open( source, conf )
assert(not socket)
local address = conf.address or "0.0.0.0"
local port = assert(conf.port)
local port = conf.port
maxclient = conf.maxclient or 1024
nodelay = conf.nodelay
skynet.error(string.format("Listen on %s:%d", address, port))
skynet.error("Listen on", address, port)
socket = socketdriver.listen(address, port, conf.backlog)
listen_context.co = coroutine.running()
listen_context.fd = socket