A while back I wrote a script that listens on a UDP port for syslog type messages from a bunch of sonicwall firewalls. It parses interesting information out and saves it into a sql database from which we do reports.
My problem is that the NT service that sends the syslog messages to the machine that my script lives on, locks up, dies or otherwise ceases to send info. If I restart the service on the other machine everything works again.
My question is how do I get the script to tell me it hasn't received any info in a while so I know when to do something about this service? I looked into using timeout but it doesn't seem to do what I want. I am about to look into noting the time between messages coming in and when the time is more than X notify someone (or maybe remotely restart the service on the other machine, but that is another problem). Does anyone know a feature of IO:Socket or some other method of noticing the LACK of traffic on a UDP port?