Skip to content

Commit

Permalink
fix: set client and server streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
LYF1999 committed Aug 9, 2022
1 parent e5aa4fd commit c95dd05
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
8 changes: 8 additions & 0 deletions protobuf-parse/src/pure/convert/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,14 @@ impl<'a> Resolver<'a> {
.full_name
.to_string(),
);

if input.client_streaming {
output.set_client_streaming(input.client_streaming);
}

if input.server_streaming {
output.set_server_streaming(input.server_streaming);
}
Ok(output)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
syntax = "proto2";


message Req {
required int32 a = 1;
repeated string b = 2;
}

message Resp {
required int32 status = 1;
}

service TestService {
rpc test_client_streaming(stream Req) returns (Resp);
rpc test_server_streaming(Req) returns (stream Resp);
rpc test_bi_streaming(stream Req) returns (stream Resp);
}

0 comments on commit c95dd05

Please sign in to comment.