Hello
This function is a callback (an event that is called when an external library want to tell you that something happened), your code must not call this function, so expecting a return value is pointless.
In fact, if it returned something, the return value would be used by the code who called the callback, never by your own code
To understand, here is an example... Imagine a library had code like this:
bool userCallbackResult = onTryConnect(); // call the callback and store its return value
if ( userCallbackResult == true ) // user decided to return true
{
allowConnection();
}
else // user decided to return false
{
blockConnection();
}
Then in your code you could do something like this :
bool onTryConnect()
{
// block connections between 6h and 12h
if ( hour >= 6 && hour < 12 )
{
return false;
}
return true;
}