Hi all!
found in the ngx.timer.at() description that it can not work with cosocket based operations:
So suppose when i work with websocket i can not share ws instance object for
ws:send_text("text")
operation at the ngx.timer.at() function
like this:
local function handler()
handledData = someDataHandler(daata)
ws:send_text(handledData)
end
while true do
local data,err = redisClent:read_reply()
if not err then
ngx.timer.at(0,handler,ws,data)
end
end
Can someone to say - am i right in my understanding
and if yes maybe give me suggestion:
how better to handle websockets loop for not block redis reply while i handle previous reply?