Hello,
recently I started using protobuf for one of my projects, as I finished 
with defining my services I tried to compile but it didn't worked. That was 
because I defined my functions like at {2} , I did this because for me as 
programmer it is normal that functions can be defined with more than one 
parameter. In my opinion protobuf should support it because it improves 
readably and if I can omit the messages to encapsulate others so the 
codebase will be  also smaller.


message User {
    required bytes uuid = 1;
    required string name = 2;
}


message ChatMessage {
    required User sender = 1;
    required string msg = 2;
}


message StatusResponse {
    required int32 status = 1;
}


//That's what I currently do {1}
message MessageTransfer {
    required User recipient = 1;
    required ChatMessage msg = 2;
}


service ChatService {
    rpc sendmessage(MessageTransfer) returns (StatusResponse);
}


//That's what I want to do {2}
service ChatService {
    rpc sendmessage(ChatMessage msg ,User recipient) returns (StatusResponse
);
}

Thanks for reading

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to