websocket首页的Limitation有这么一句话:The resty.websocket object instance cannot be stored in a Lua variable at the Lua module level.
这是不是意味着,我不能在ws.lua中新建一个websocket,然后调用check.lua中的函数处理?例如:
check.lua
function check(wb)
do_something
end
ws.lua
local check = require "check"
local wb, err = server:new {
timeout = 10000, -- in milliseconds
max_payload_len = 65535,
}
check.check(wb)
这样是不允许的。这样理解对吗?