protobuf-objc icon indicating copy to clipboard operation
protobuf-objc copied to clipboard

Encode Delimited

Open ido-ran opened this issue 9 years ago • 1 comments

I'm writing a client application in iOS that uses ProtocolBuffer with this library. I have a server written with ProtobufJS, there I'm using both encodeDelimited and decodeDelimited which AFAIK write the length of the message before the message.

The problem is I could not find a match methods for length delimited in ProtoBuf-ObjC. Can you help me understand how to do that?

ido-ran avatar Jan 26 '16 09:01 ido-ran

I manage to send a delimited message using the following code:

    PBCodedOutputStream *codedOutput = [PBCodedOutputStream streamWithOutputStream:socketConnection.outputStream];
    [codedOutput writeRawVarint32:msg.serializedSize];
    [msg writeToCodedOutputStream:codedOutput];

I can try to fork this repository and add the functionality.

ido-ran avatar Jan 26 '16 10:01 ido-ran