phpnats icon indicating copy to clipboard operation
phpnats copied to clipboard

Protobuf as payload

Open ipadavic opened this issue 9 years ago • 6 comments

Hi,

I'm trying to use Protocol Buffers as payload. Having golang server and client works fine, but when using same golang server and php client, protobuf is not decoded properly.

Can this lib be used with protobuffs? I see that @byrnedo commented something about protobuf in PR #61 .

Thanks.

ipadavic avatar Oct 14 '16 08:10 ipadavic

Hi, I'm using https://github.com/drslump/Protobuf-PHP and using it's decode to read the message payloads. Has been working fine for me.

byrnedo avatar Oct 14 '16 12:10 byrnedo

Thanks! Going to take a look ASAP. 👍

repejota avatar Oct 14 '16 12:10 repejota

Great, I'll try this. I'm using https://github.com/protobuf-php/protobuf and was unable to connect this via phpnats. Will let you know if drslump fixed this.

ipadavic avatar Oct 14 '16 12:10 ipadavic

Heh drslump/Protobuf-PHP generated code is not nearly PSR friendly :(

ipadavic avatar Oct 14 '16 12:10 ipadavic

Sorry for trolling :/. Had some bug on client side. It seems everything works just fine even with https://github.com/protobuf-php/protobuf. So you can probably close this issue.

ipadavic avatar Oct 14 '16 13:10 ipadavic

I must try protobuf-php/protobuf, I gave up before and drslump just ended up working. Yeah, I had to tweak some stuff to get the class loading to work :o

byrnedo avatar Oct 15 '16 08:10 byrnedo