Using google proto as a on wire data format

33 views
Skip to first unread message

Sumit Patil

unread,
Feb 26, 2023, 12:08:40 PM2/26/23
to Protocol Buffers
Hii everyone, 
I am trying to use google proto to transfer data from client to server and vice versa.
I am not getting, how I can implement such thing. 
I am thinking of these steps:
* Client
1. Set proto message's fields 
2. Serialize to byte array 
3. encrypt
4. Send from client 

* Server
1. Decrypt 
2. Deserialize
3. Print message

Is this process correct and if yes can you suggest functions/implementations to do that.
I suppose for client step2 I can use SerializeToArray, but how can I encrypt it?
Also is it possible to compress that data, I mean will it work in protobuff?

Sumit Patil

unread,
Feb 26, 2023, 12:14:07 PM2/26/23
to Protocol Buffers
Note - lang = CPP

Adam Cozzette

unread,
Feb 27, 2023, 1:57:09 PM2/27/23
to Sumit Patil, Protocol Buffers
I think you probably want to use an RPC framework such as gRPC which will handle all this for you.

--
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 protobuf+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/66045341-82d4-4fc6-af1a-7485457c0849n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages