I have a UDP server that I have being trying to send structures using send() method.. No luck so far...
This is what I am using:
H,G are structures...
sender side:
IFormatter formatter = new BinaryFormatter();
MemoryStream stream = new MemoryStream();
formatter.Serialize(stream, H);
Byte[] buffer = stream.ToArray();
stream.Close();
and on the receiver side:
IFormatter formatter = new BinaryFormatter();
Stream s = new MemoryStream(buffer.Data);
ClientAnswerStruct G = (ClientAnswerStruct)formatter.Deserialize(s);
s.Close();
MessageBox.Show(G.name);
But I get this error:
Unable to find assembly 'UdpClientSample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
'UdpClientSample' happens to be the title of the client program that is sending the data to the server... So I'm wondering if it takes more than serialization to be able so send a structure through UDP connection?
Is there a breakthrough out there that explains what Iamamac says?