In the RODL file we used the AnsiString type as parameter. Now we wanted to convert this RODL to code-first (c#, .net6). How can we make the code-first server to work correctly with existing Delphi clients? We are using the newest ROSDK 10.0.0.1559.
thank you for your fast answer. I tried both code-first with StreamAs(StreamingFormat.AnsiString) and creating the server with RODL and *_Impl.cs. Neither works.
I’m using IpSuperTcpChannel and BinMessage.
I made a simple Delphi client and implemented the Login-Method with both string parameters as AnsiString. When I send ‘abcüdef’ as the username-string, I see in the Wireshark-log the bytes 0x61 0x62 0x63 0xFC 0x64 0x65 0x66. But in the Login function in the server (LoginService_Impl.cs) I receive the string ‘abc?def’
Ok, I understand. So is it possible to use BinMessage with Encoding.Latin1? Or to derive from BinMessage an create my own BinMessageWithLanin1 class to use it with the server?
public class BinMessageLatin1 : BinMessage
{
public BinMessageLatin1() : base()
{
}
protected override void InitializeSerializer()
{
_serializer = new BinSerializer(Encoding.Latin1);
}
}
It’s only for backward compatibilty. I’ve to replace the server first an then update the clients. The new Delphi clients can deal with utf-8.