openresty / openresty/lua-resty-websocket

websocket client example

Open
#40 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
523
Forks
112
Avg merge
1d 16m
Merged PRs (30d)
2

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the websocket client sample in the README and the reported failure at openresty/lualib/resty/websocket/protocol.lua:21. Reproduce it using the stated package.path, then document a working client example and the environment needed for it to run successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
documentation, networking
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.