Git Product home page Git Product logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024
I'm afraid you haven't provided nearly enough information about what you're 
trying to do, what kind of packet you're talking about etc. *Much* more 
information is needed if we're going to be able to help you.

Original comment by jonathan.skeet on 7 Mar 2012 at 10:25

from protobuf-csharp-port.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024
I'm sorry for so poor description.
After a complete message data received by socket that is  byte array serialized 
from a proto class,the trouble is how to get the type of the data.So that the 
next step it is and be deserialized into a relevant class object similar to  
xxx.ParseFrom(byte[] data)

Original comment by [email protected] on 7 Mar 2012 at 1:17

from protobuf-csharp-port.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024
If you've just put a serialized message on, with no other descriptor, then you 
can't get the type... it's not part of the serialized form. If it could be one 
of multiple types, you should create a *wrapper* type which is effectively a 
discriminated union (see the "techniques" page in the main protobuf wiki). 
Deserialize to *that* message (because it'll always be that) and then you can 
detect which submessage to fetch.

(This isn't a defect in protobuf-csharp-port, it's just a Protocol Buffer 
technique you need to know about.)

Original comment by jonathan.skeet on 7 Mar 2012 at 1:20

  • Changed state: WontFix

from protobuf-csharp-port.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.