… | |
… | |
1087 | before it was actually written. One way to do that is to replace your |
1087 | before it was actually written. One way to do that is to replace your |
1088 | C<on_drain> handler by a callback that shuts down the socket (and set |
1088 | C<on_drain> handler by a callback that shuts down the socket (and set |
1089 | C<low_water_mark> to C<0>). This method is a shorthand for just that, and |
1089 | C<low_water_mark> to C<0>). This method is a shorthand for just that, and |
1090 | replaces the C<on_drain> callback with: |
1090 | replaces the C<on_drain> callback with: |
1091 | |
1091 | |
1092 | sub { shutdown $_[0]{fh}, 1 } # for push_shutdown |
1092 | sub { shutdown $_[0]{fh}, 1 } |
1093 | |
1093 | |
1094 | This simply shuts down the write side and signals an EOF condition to the |
1094 | This simply shuts down the write side and signals an EOF condition to the |
1095 | the peer. |
1095 | the peer. |
1096 | |
1096 | |
1097 | You can rely on the normal read queue and C<on_eof> handling |
1097 | You can rely on the normal read queue and C<on_eof> handling |