application lock/mutex module based on sockets