|Think about Loose Coupling|
Hashes for countingby hari9 (Sexton)
|on Aug 06, 2010 at 17:33 UTC||Need Help??|
hari9 has asked for the
wisdom of the Perl Monks concerning the following question:
I'm trying to maintain a record of how many times clients connects to a server(This information is then processed further for directing the client suitably)
I'm using hashes which has the following keys: peer_address, times_connected.
so everytime a client connects to a server, its times_connected is incremented.And the code at the server side is as below:
Now when I run client script from one machine, I get a proper count of times_connect, but when I use the second machine to run the client code, the times_connect is getting mixed up.
in short, I'm not able to get times_connect for each client.Any help you be great. Thanks