MCPcopy Create free account
hub / github.com/apache/brpc / SendStreamClose

Function SendStreamClose

src/brpc/policy/streaming_rpc_protocol.cpp:151–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151void SendStreamClose(Socket *sock, int64_t remote_stream_id,
152 int64_t source_stream_id) {
153 CHECK(sock != NULL);
154 StreamFrameMeta fm;
155 fm.set_stream_id(remote_stream_id);
156 fm.set_source_stream_id(source_stream_id);
157 fm.set_frame_type(FRAME_TYPE_CLOSE);
158 butil::IOBuf out;
159 PackStreamMessage(&out, fm, NULL);
160 Socket::WriteOptions wopt;
161 wopt.ignore_eovercrowded = true;
162 sock->Write(&out, &wopt);
163}
164
165int SendStreamData(Socket* sock, const butil::IOBuf* data,
166 int64_t remote_stream_id, int64_t source_stream_id,

Callers 1

BeforeRecycleMethod · 0.85

Calls 2

PackStreamMessageFunction · 0.85
WriteMethod · 0.45

Tested by

no test coverage detected