Sending data
-
Hi Ppl, I have a small question. Is it possible to use sendto to send entire structs / arrays with a few commands? Right now i have a function to create one long string and an other one to make it back to an array but this kind of in efficient and the data u can send is pretty limited. Can anyone tell me how to send data in an efficient way? Kind regards , Jacco
-
Hi Ppl, I have a small question. Is it possible to use sendto to send entire structs / arrays with a few commands? Right now i have a function to create one long string and an other one to make it back to an array but this kind of in efficient and the data u can send is pretty limited. Can anyone tell me how to send data in an efficient way? Kind regards , Jacco
You could use a
BinaryFormatter
to serialize your data into a byte array and then just send it. Here is an example: http://msdn2.microsoft.com/en-us/library/4abbf6k0.aspx Just use a MemoryStream instead of a FileStream regards