|
-
March 27th, 2009, 06:24 AM
#1
Sending data over SOCKETS (serialization)
Hi,
I am trying to send an array of objects over a socket using winsock. Obviously I can't send the array in its current form and need to somehow convert it to an appropriate format. I have heard of the following "ideas" - serialisation, and converting to a byte array.
Would anyone be able to give me a quick example of how I might approach this, considering that the array we wish to convert is an array called products of type ProductInfo:
ProductInfo products[10];
I will be sending the eventual data via: send(client, senddata, (int)strlen(senddata), 0 );
David.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|