J
John J. Hughes II
I am serializing a dataset and sending it across a slow socket connection
using the following code. I know I can send binary data across a socket but
when I serialize the dataset it ends up being text and very large. I am
thinking about zipping it but was wondering if maybe there was a better way?
System.Runtime.Serialization.IFormatter f = new
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
System.IO.MemoryStream ms1 = new System.IO.MemoryStream();
f.Serialize(ms1, DataArg);
this.socket.Send(ms1.GetBuffer());
Regards,
John
using the following code. I know I can send binary data across a socket but
when I serialize the dataset it ends up being text and very large. I am
thinking about zipping it but was wondering if maybe there was a better way?
System.Runtime.Serialization.IFormatter f = new
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
System.IO.MemoryStream ms1 = new System.IO.MemoryStream();
f.Serialize(ms1, DataArg);
this.socket.Send(ms1.GetBuffer());
Regards,
John