liteserver / binn

Binary Serialization
Apache License 2.0
440 stars 58 forks source link

Sending object to C# TCP server #16

Open hubertcy opened 6 years ago

hubertcy commented 6 years ago

Hi,

I am upgrading one side of my PC to use C# instead of C while the other side must stay in C. I can send from C side no problem. The problem is at the C# receiving side. I am unable to create a binn object to use binn functions. I did try to use C# method to read incoming stream like below.

byte[] dataBuf = new byte[received]; Array.Copy(_buffer, dataBuf, received); string text = Encoding.ASCII.GetString(dataBuf); Console.WriteLine(text);

I am unable to de-serialize correctly. I tried to use the binn-1.0.dll in C# but I got stuck needing to create a binn object in C#. Could #anyone enlighten me?