theRainbird / CoreRemoting

RPC library with classic .NET Remoting flavour
MIT License
62 stars 21 forks source link

MessagePack Serialization Fails #42

Open GammaSoul opened 1 year ago

GammaSoul commented 1 year ago

Describe the bug Hi there im having some trouble with your library Using MessagePack (https://github.com/neuecc/MessagePack-CSharp) fails The application hangs and then i get the error: Error Wrong Credentials Handshake with server failed. Apart from the having to use the standard MessagePack resolver Serializer because there is some types of object to be serialized, it fails once that is resolved. I need to serialize some types like NodaTime and others that MessagePack supports. Also MessagePack has the best performance.

Update: When using the included Bson Serialization and i enclose my types in a data contract object then it works. does not work if the type is a raw method parameter.

So this is really just about supporting MessagePack for performance as i got Bson to work with my Types. . Thank you for having a look at this if you can 👍

theRainbird commented 10 months ago

Hi GammaSoul,

MessagePack is difficult to implement, because you have to decorate every type that is serialized with attributes ([MessagePackObject] and [Key]) or provide other metadata. CoreRemoting has some internal classes that describe messages. This classes are serialized using the plugged in serializer. Because this classes are not decorated with MessagePack stuff, serialization fails.