Name
msg:context_set — Sets a context variable
Synopsis
msg:context_set(type, key, value);
type: numeric key: string value: string
Description
Set a context variable. Legal values for type
are:
-
msys.core.ECMESS_CTX_MESS
-
msys.core.ECMESS_CTX_CONN
msg:context_set(msys.core.ECMESS_CTX_MESS, "MyVariable", "MyValue")
Note
The companion function, msg:context_get
, always returns a string. If, for example, MyValue
is a local numeric variable, msg:context_get
will still return a string.
Because this function is in the msys.core
namespace, an explicit require('msys.core')
is not necessary.
See Also
Was this page helpful?