function plugin_ctx_new(sess, plug_env, sess_context) print("now begin to create new ctx context example-1") print(plug_env.data) sess_context.id = 100 end function plugin_ctx_free(sess, sess_context, plug_env) print("now begin to free ctx context example-1") print(sess_context.id) end function plugin_load(stellar, plug_env) print("now begin to load plugin example-1") plug_env.data = "my example-1 plugin env" plug_env.newid = 1000 plug_env.id = plugin_manage.register(stellar, plugin_ctx_new, plugin_ctx_free, plug_env) plug_env.messid = 100 end function plugin_unload(plug_env) print("now running unload plugin example-1 function") -- print(plug_env.__penv_pointer) -- print(plug_env.data) -- print(plug_env.newid) -- print(plug_env.messid) end