Skip to content

Commit b6d0542

Browse files
LYF1999stepancheg
authored andcommitted
fix: set client and server streaming
1 parent 56e74cb commit b6d0542

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

protobuf-parse/src/pure/convert/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,14 @@ impl<'a> Resolver<'a> {
341341
.full_name
342342
.to_string(),
343343
);
344+
345+
if input.client_streaming {
346+
output.set_client_streaming(input.client_streaming);
347+
}
348+
349+
if input.server_streaming {
350+
output.set_server_streaming(input.server_streaming);
351+
}
344352
Ok(output)
345353
}
346354

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
syntax = "proto2";
2+
3+
4+
message Req {
5+
required int32 a = 1;
6+
repeated string b = 2;
7+
}
8+
9+
message Resp {
10+
required int32 status = 1;
11+
}
12+
13+
service TestService {
14+
rpc test_client_streaming(stream Req) returns (Resp);
15+
rpc test_server_streaming(Req) returns (stream Resp);
16+
rpc test_bi_streaming(stream Req) returns (stream Resp);
17+
}
18+

0 commit comments

Comments
 (0)