in reply to win32::serialport buffer overflow
where you discarded the input size with undef. What you should do is -(undef, $string_in) = $ob->read(65536);
So the idea is to keep reading the input, and append to the input string, until there is no more input.my $input_string; { my ($size, $str) = $ob->read(4096); # 4k at a time $input_string .= $str; redo if ($size == 4096); # read more? }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: win32::serialport buffer overflow
by Anonymous Monk on Nov 17, 2003 at 23:27 UTC |