D
Dad
I'm really new to Perl so any help or direction on where to look is
welcomed.
I used the server example from the Perl Cookbook and modified it to accept
SNMP trap messages from a Linksys router on UDP port 162, process the
message as inbound, outbound, or unknown and store in the appropriate
mysql database table. I want to add a gui to the application and display
real-time statistics about traffic, etc. I used QTDesigner to build the
gui seprately and puic to create the final Perl code. The gui now works
great but only without the "server" code to get/process the traps. I'm
using IO::Socket for the network interface.
My problem seems to be the while ($sock->receive($trap,$MAX)) loop is
blocking and the program hangs until a trap comes in and the buttons on
the gui are essentially useless. Is there a better way to handle incoming
udp messages? How can I multi-thread so that the gui continues to
function and the displays are updated when a message is received? Is
there a call-back feature I can use?
Thanks,
welcomed.
I used the server example from the Perl Cookbook and modified it to accept
SNMP trap messages from a Linksys router on UDP port 162, process the
message as inbound, outbound, or unknown and store in the appropriate
mysql database table. I want to add a gui to the application and display
real-time statistics about traffic, etc. I used QTDesigner to build the
gui seprately and puic to create the final Perl code. The gui now works
great but only without the "server" code to get/process the traps. I'm
using IO::Socket for the network interface.
My problem seems to be the while ($sock->receive($trap,$MAX)) loop is
blocking and the program hangs until a trap comes in and the buttons on
the gui are essentially useless. Is there a better way to handle incoming
udp messages? How can I multi-thread so that the gui continues to
function and the displays are updated when a message is received? Is
there a call-back feature I can use?
Thanks,