GithubHelp home page GithubHelp logo

Comments (7)

Barenboim avatar Barenboim commented on June 11, 2024

Sure.

from srpc.

ouclbc avatar ouclbc commented on June 11, 2024

thank you very much

from srpc.

ouclbc avatar ouclbc commented on June 11, 2024

rpc A() returns (B);这种形式出错,Expected type name,空的参数不行么?

from srpc.

holmes1412 avatar holmes1412 commented on June 11, 2024

这个属于protobuf的语法问题哈~
protobuf是不支持rpc A() returns (B);这种的,你可以这样:

import "google/protobuf/empty.proto";
service MyService {
  rpc A(google.protobuf.Empty) returns (B);
}

可以参考这个:https://stackoverflow.com/questions/31768665/can-i-define-a-grpc-call-with-a-null-request-or-response

from srpc.

ouclbc avatar ouclbc commented on June 11, 2024

参考#120 这个,编译的时候出现如下错误

.srpc.h:1083:70: error: ‘protobuf’ in namespace ‘google’ does not name a type

from srpc.

ouclbc avatar ouclbc commented on June 11, 2024

message Null {};直接自己写一个

from srpc.

holmes1412 avatar holmes1412 commented on June 11, 2024

好的~是的这样和protobuf自带那个Empty是一样的,还避免了找它的namespace的麻烦

from srpc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.