Native access for Events functions
Sebastian Jura
If you use c modules you should be able to access Events functions directly without using lua bridge. For example if you create function name "nanosInternalSetEvents" and export it then Nanos will recognize it and provide you an interface with events functions.
Example:
```c
class Events{
public:
CallRemote(const char
name, int entityIndex, const char
payload);Call(const char
name, const char
payload);Subscribe(...)
}
extern "C" void nanosInternalSetEvents(Events* events) {
events->CallRemote(...) // Equivalent of "Events.CallRemote(...)"
}
```
It will make easier to integrate third party things. For example sockets library could call
events->Call("socketData", data)
when new data arrive