at the moment, I'm having a "simple" licensing system: when a users logs on, I set a logical to .T. When a user logs off, I set the logical to .F.
When the application crashes, I found a method (based on a text file) to set this logical back to .F. when the user reconnects afters an unexpected shutdown.
BUT this last method isn't waterproof, sometimes the user can't login anymore.
Is there a better method that can "see" when a user is logged in or not? I thought about a licensing server which counts the active connections (count the active TCP/IP connections) but I don't know how to start with it.
I also though about a method to use "RLOCKS" to check whether a user is logged in or not but that's not working because "RLOCK()" is still active when a user loses his network connection (the lock will be automatically released after a few minutes but not immediatly)
How do you guys fix this in foxpro?
I just want to limit the number of licenses so that my application can't be started of there are more then <x> active sessions.