Skip to content

Commit

Permalink
mobile: Remove the deprecated Stream::sendData and Stream::close (#34059
Browse files Browse the repository at this point in the history
)

Risk Level: low
Testing: CI
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: mobile

Signed-off-by: Fredy Wijaya <fredyw@google.com>
  • Loading branch information
fredyw committed May 9, 2024
1 parent b015974 commit 7b7ab06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
10 changes: 0 additions & 10 deletions mobile/library/cc/stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ Stream& Stream::sendHeaders(Http::RequestHeaderMapPtr headers, bool end_stream)
return *this;
}

Stream& Stream::sendData(envoy_data data) {
Buffer::InstancePtr buffer = Data::Utility::toInternalData(data);
return sendData(std::move(buffer));
}

Stream& Stream::sendData(Buffer::InstancePtr buffer) {
engine_->sendData(handle_, std::move(buffer), false);
return *this;
Expand All @@ -34,11 +29,6 @@ void Stream::close(Http::RequestTrailerMapPtr trailers) {
engine_->sendTrailers(handle_, std::move(trailers));
}

void Stream::close(envoy_data data) {
Buffer::InstancePtr buffer = Data::Utility::toInternalData(data);
close(std::move(buffer));
}

void Stream::close(Buffer::InstancePtr buffer) {
engine_->sendData(handle_, std::move(buffer), true);
}
Expand Down
10 changes: 6 additions & 4 deletions mobile/library/cc/stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,18 @@ class Stream {
*/
Stream& sendHeaders(Http::RequestHeaderMapPtr headers, bool end_stream);

[[deprecated]] Stream& sendData(envoy_data data);

/**
* Send data over an open HTTP stream. This method can be invoked multiple times.
*
* @param buffer the data to send.
*/
Stream& sendData(Buffer::InstancePtr buffer);

/**
* Reads the data up to the number of `bytes_to_read`.
*
* @param bytes_to_read the number of bytes read
*/
Stream& readData(size_t bytes_to_read);

/**
Expand All @@ -43,8 +46,6 @@ class Stream {
*/
void close(Http::RequestTrailerMapPtr trailers);

[[deprecated]] void close(envoy_data data);

/**
* Send data over an open HTTP stream and closes the stream.. This method can only be invoked
* once.
Expand All @@ -53,6 +54,7 @@ class Stream {
*/
void close(Buffer::InstancePtr buffer);

/** Cancels the stream. */
void cancel();

private:
Expand Down

0 comments on commit 7b7ab06

Please sign in to comment.