- # this is returned to the calling application:
- Plack::Util::inline_object(write => $write, close => $close);
- }
-}
-
-use constant MSG_MORE => ($^O eq 'linux') ? 0x8000 : 0;
-sub more ($$) {
- my $self = $_[0];
- return if $self->{closed};
- if (MSG_MORE && !$self->{write_buf_size}) {
- my $n = send($self->{sock}, $_[1], MSG_MORE);
- if (defined $n) {
- my $dlen = length($_[1]);
- return 1 if $n == $dlen; # all done!
- $_[1] = substr($_[1], $n, $dlen - $n);
- # fall through to normal write:
- }