… | |
… | |
61 | undef $wr; |
61 | undef $wr; |
62 | undef $rd; |
62 | undef $rd; |
63 | |
63 | |
64 | $wr_ae->push_write (netstring => "0:xx,,"); |
64 | $wr_ae->push_write (netstring => "0:xx,,"); |
65 | $wr_ae->push_write (netstring => ""); |
65 | $wr_ae->push_write (netstring => ""); |
66 | $wr_ae->push_write (packstring => "w", "hallole" x 99); |
66 | $wr_ae->push_write (packstring => "w", "hallole" x 99999); # try to exhaust socket buffer here |
67 | $wr_ae->push_write ("A\nBC\nDEF\nG\n" . ("X" x 113) . "\n"); |
67 | $wr_ae->push_write ("A\nBC\nDEF\nG\n" . ("X" x 113) . "\n"); |
68 | undef $wr_ae; |
68 | undef $wr_ae; |
69 | |
69 | |
70 | $rd_ae->push_read (netstring => sub { is ($_[1], "0:xx,,"); }); |
70 | $rd_ae->push_read (netstring => sub { is ($_[1], "0:xx,,"); }); |
71 | $rd_ae->push_read (netstring => sub { is ($_[1], ""); }); |
71 | $rd_ae->push_read (netstring => sub { is ($_[1], ""); }); |
72 | $rd_ae->push_read (packstring => "w", sub { is ($_[1], "hallole" x 99); }); |
72 | $rd_ae->push_read (packstring => "w", sub { is ($_[1], "hallole" x 99999); }); |
73 | |
73 | |
74 | $cv->wait; |
74 | $cv->wait; |
75 | |
75 | |
76 | is ($concat, "A:BC:DEF:G:" . ("X" x 113) . ":", 'second lines were read correctly'); |
76 | is ($concat, "A:BC:DEF:G:" . ("X" x 113) . ":", 'second lines were read correctly'); |
77 | } |
77 | } |