Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set client and server streaming #646

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}