System.IO.EndOfStreamException & protobuf-net
קודדתי את הclass ל - SerializeToString בצד הלקוח c++,
ובצד השרת אני מנסה לבנות את המחלקה בחזרה ע"י
using (MemoryStream memStream = new MemoryStream(buffer, 0, recvBytes))
{
ProtoData data = ProtoBuf.Serializer.Deserialize<ProtoData>(memStream);
כמובן שאני משתמש ב-
protobuf - net, c#
מקבל את החריגה הזו :
Unhandled Exception: System.IO.EndOfStreamException: Attempted to read past the
end of the stream.
at ProtoBuf.ProtoReader.Ensure(Int32 count, Boolean strict) in c:\Dev\protobu
f-net\protobuf-net\ProtoReader.cs:line 257
at ProtoBuf.ProtoReader.ReadString() in c:\Dev\protobuf-net\protobuf-net\Prot
oReader.cs:line 494
לא הצלחתי להבין מחיפוש בגוגל למה השגיאה הזו קורת ואיך לתקן את זה
אשמח לקבלת עזרה
קודדתי את הclass ל - SerializeToString בצד הלקוח c++,
ובצד השרת אני מנסה לבנות את המחלקה בחזרה ע"י
using (MemoryStream memStream = new MemoryStream(buffer, 0, recvBytes))
{
ProtoData data = ProtoBuf.Serializer.Deserialize<ProtoData>(memStream);
כמובן שאני משתמש ב-
protobuf - net, c#
מקבל את החריגה הזו :
Unhandled Exception: System.IO.EndOfStreamException: Attempted to read past the
end of the stream.
at ProtoBuf.ProtoReader.Ensure(Int32 count, Boolean strict) in c:\Dev\protobu
f-net\protobuf-net\ProtoReader.cs:line 257
at ProtoBuf.ProtoReader.ReadString() in c:\Dev\protobuf-net\protobuf-net\Prot
oReader.cs:line 494
לא הצלחתי להבין מחיפוש בגוגל למה השגיאה הזו קורת ואיך לתקן את זה
אשמח לקבלת עזרה