Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27329

VS 2012 Sending GUIDs and a byte array over LAN.

$
0
0
I need to send a couple of GUIDs and a byte array over a LAN.

I thought about creating a serializable Class containing the GUIDs and byte array as properties. Then binary serialize it into a tcpclient stream. At the other end I can deserialize it back into the original Class.
I am aware both the sending and receving programs will have to have the same Class defintion for this to work.Probably tucked away in a .dll file.

It also occured to me that it would be easier just to Convert the GUIDs to byte arrays (guid.tobytearray). Just write them to a tcpclient stream. Again at the other end I just read the bytes and reassemble back into GUIDS and byte array. I knows its a bit more complex than this but still relatively straight forward.

Im not sure which way is the better way to go. Or even if one is better than the other. Is there a better way?

Any ideas.

Viewing all articles
Browse latest Browse all 27329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>