x.cloud - Cloud Server Hook

x.cloud.ondata = function(filename, txt, zlws)

Called when the Cloud server has source data to inject. #Firmware/v292

The default Lua function “CloudOnData” is hooked such that it pulls the channel number from the filename ('.##.'), and whether the file is zlib compressed ('.zlib').

The hook function uses the Lua zlib.inflate, and calls the appropriate
sources[#]:pushopen / :push / :pushclose functions.

Needs to return the two results from the sources[#]:push call.

  • e.g. return true -- indicates that the function succeeded
  • e.g. return NULL, 'error string' -- reported back to the Cloud
    server