Re: [protobuf] How to encode nested Python Protobuf

2013-09-25 Thread chrisgyor
Chris, Your suggestion of trying base64 worked on the nested protobuf. Thanks to you and Llia again for taking the time to share your thoughts. Here is the solution that ended up working with the websocket server that I'm using. def GetHeartbeat(self): print GetHeartbeat called

Re: [protobuf] How to encode nested Python Protobuf

2013-09-25 Thread Ilia Mirkin
I believe Chris's suggestion was to base64-encode the full message, not the subproto, or you'll run into other problems down the line, since it sounds like your transport can't handle arbitrary byte sequences. IOW, something like response.response_proto = heartbeatResult.SerializeToString()

Re: [protobuf] How to encode nested Python Protobuf

2013-09-25 Thread chrisgyor
Ilia (sorry for the misspell of your name previously), I'll keep your suggestion in mind if I start to have issues when adding other nested messages. I did play around with wrapping the entire message as base64 but the websocket server seems to complain upon receiving the message. I receive an

Re: [protobuf] How to encode nested Python Protobuf

2013-09-25 Thread chrisgyor
Last update from me for a while hopefully :) Ilia, I did look at your suggestion more closely with wrapping the entire message in base64. It became apparent to me that I was only decoding base64 in my nested message handler which should have been obvious. I added some conditional decoding