in reply to Real-time socket data processing
Maybe I'm misunderstanding something, but why not simply put the processing in the loop? (together with some condition that detects when a 'packet' is complete)
Something like this:
while (defined(my $line = <$NA_Conn>)) { $input.=$line; if ($input =~ / ... /) { process($input); $input = ''; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Real-time socket data processing
by psyk0tic (Novice) on Jun 24, 2010 at 17:48 UTC |