Method Custom module return type

Hello,

I am building a module for the KMS and was wondering if you can return a value from a method, all the examples I’ve seen seem to be void methods. However, I have looked at the code for the KMS core: kms-core/core.kmd.json at cf111ef4e4e3e196792ffb60bfb48dbd7bef8512 · Kurento/kms-core · GitHub and it appears that uses a return. But looking at the code for execMethod it appears it only returns a void promise therefore no return type.

/**
* Executes a filter method. Available methods are specific for each filter
*
* @param method Name of the method
* @param params Parameters of the method
*/
execMethod(method: string, params: Object): Promise;

I am basically looking to read files from the server in a certain directory and return all the files with a particular .extension. Will this have to be achieved through an event listener?

Kurento custom modules are designed for video/audio manipulation.

It seems the OpenVidu support to execute methods in modules ignore return values. This is an important limitation.