lua-resty-websocket
lua-resty-websocket copied to clipboard
websocket client example
Using the websocket client (from sample code in the README), I get this error below: " ./openresty/lualib/resty/websocket/protocol.lua:21: attempt to index global 'ngx' (a nil value) "
I did set the package path as required.
package.path = package.path .. ";./openresty/?.lua
Is there a working sample for websocket client?
@gitdhar Please provide a minimal and self-contained example that can reproduce this. The ngx
global variable should always be there in the context of OpenResty (or ngx_lua). There must be something very wrong in your OpenResty setup.