File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -917,7 +917,8 @@ class ascii_protocol {
917917 scattered_message<char > msg;
918918 this_type::append_item<WithVersion>(msg, std::move (item));
919919 msg.append_static (msg_end);
920- return out.write (std::move (msg));
920+ std::vector<temporary_buffer<char >> bufs = std::move (msg).release ().release ();
921+ return out.write (std::span<temporary_buffer<char >>(bufs));
921922 });
922923 } else {
923924 _items.clear ();
@@ -931,7 +932,8 @@ class ascii_protocol {
931932 append_item<WithVersion>(msg, std::move (item));
932933 }
933934 msg.append_static (msg_end);
934- return out.write (std::move (msg));
935+ std::vector<temporary_buffer<char >> bufs = std::move (msg).release ().release ();
936+ return out.write (std::span<temporary_buffer<char >>(bufs));
935937 });
936938 }
937939 }
Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ future<> output_stream<CharType>::write(temporary_buffer<CharType> p) noexcept {
145145 }
146146}
147147
148+ #if SEASTAR_API_LEVEL < 9
148149template <typename CharType>
149150future<> output_stream<CharType>::write(net::packet p) noexcept {
150151 try {
@@ -159,6 +160,7 @@ template<typename CharType>
159160future<> output_stream<CharType>::write(scattered_message<CharType> msg) noexcept {
160161 return write (std::move (msg).release ());
161162}
163+ #endif
162164
163165template <typename CharType>
164166future<temporary_buffer<CharType>>
Original file line number Diff line number Diff line change @@ -512,10 +512,13 @@ public:
512512 // / Writes the given string into the buffer
513513 future<> write (const std::basic_string<char_type>& s) noexcept ;
514514
515+ #if SEASTAR_API_LEVEL < 9
515516 // / Appends the packet as zero-copy buffer
516517 future<> write (net::packet p) noexcept ;
517518 // / Appends the scattered message as zero-copy buffer
518519 future<> write (scattered_message<char_type> msg) noexcept ;
520+ #endif
521+
519522 // / Appends the temporary buffer as zero-copy buffer
520523 future<> write (temporary_buffer<char_type>) noexcept ;
521524 // / Appends a bunch of buffers as zero-copy
You can’t perform that action at this time.
0 commit comments