💬

Community answer

Collected from the ACE community Discord archive around 2020-07-17. It may be informal or outdated — anyone can edit this page to improve it. Original discussion

Passing extra args through net.readStream callback

🌙 LuaUpdated 2 days ago•0 views
The callback signature is fixed - you can't inject args. Instead capture them in an upvalue/closure around the callback, or use hook.runRemote/hook.add("remote"…

Can I pass other vars to the net.readStream callback

The callback signature is fixed - you can't inject args. Instead capture them in an upvalue/closure around the callback, or use hook.runRemote/hook.add("remote") which passes the sender and payload table.

Was this article helpful?

See More

Discussion(0)

No comments yet. Be the first to ask a question!

Have a question? Sign in to join the discussion.