You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.
This looks to be unimplemented at the moment (see: #2) However, it's easy enough to use tokio to ::spawn two services on different ports for the time being.
What @davidvartan suggested works, there are ways you can manually build a router to serve both on the same socket. This would require you to detect the incoming path. Mostly likely need to write some custom services like so https://github.com/tower-rs/tower-hyper/blob/master/examples/server.rs#L41. This is roughly what tower-grpc-build does but you can wrap it. Then dispatch the call based on the incoming path.
the content of the proto file:
syntax = "proto3";
package helloworld;
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
}
// The request message containing the user's name.
message HelloRequest {
string name = 1;
}
// The response message containing the greetings
message HelloReply {
string message = 1;
}
service Talk {
rpc TalkSomething (TalkRequest) returns (TalkReply) {}
}
message TalkRequest {
string name = 1;
}
message TalkReply {
string message = 1;
}
the codes of the server.rs file:
let new_service = server::GreeterServer::new(Greet);
how to modify these code ?
thank you!!!
The text was updated successfully, but these errors were encountered: