… | |
… | |
272 | |
272 | |
273 | #TODO: maybe append the packet to any existing string command already in the queue |
273 | #TODO: maybe append the packet to any existing string command already in the queue |
274 | |
274 | |
275 | # ideally, we would want to use "a (w/a)*" as format string, but perl versions |
275 | # ideally, we would want to use "a (w/a)*" as format string, but perl versions |
276 | # from at least 5.8.9 to 5.16.3 are all buggy and can't unpack it. |
276 | # from at least 5.8.9 to 5.16.3 are all buggy and can't unpack it. |
277 | push @{ $self->[2] }, pack "N/a", pack "(w/a)*", @_; |
277 | push @{ $self->[2] }, pack "N/a*", pack "(w/a*)*", @_; |
278 | |
278 | |
279 | $self->[3] ||= AE::io $self->[1], 1, sub { |
279 | $self->[3] ||= AE::io $self->[1], 1, sub { |
280 | # send the next "thing" in the queue - either a reference to an fh, |
280 | # send the next "thing" in the queue - either a reference to an fh, |
281 | # or a plain string. |
281 | # or a plain string. |
282 | |
282 | |