Original Post
I have a question regarding sockets, tcpclient, udpclient, tcplistener etc. The problem concerns how to send "objects" intead of just strings or such. What i want to do, or is trying to do is simply to define classes/structs and send those as objects. Each class will have a header at the top, the first x num bytes. So that when i'm receiving data i'll always start by reading the first few x bytes and parse them into the message header class/struct so i know what data is in the buffer. First of all, i need to know the size of the message classes or structs, but sizeof doesn't work so i have to get the size some other way(?). Could anyone direct me to information or how i should send information properly using *clients and sockets?