Code:
uint_8 *buffer; // this is just a data buffer
struct somestruct *aHeaderStruct; // some header structure
int sock; // your socket
send (sock, aHeaderStruct, sizeof(struct somestruct),0);
send (sock, buffer, sizeof(uint_8),0);
The sizes there may not be inappropriate, but there is nothing special you need to do. You just send the data.
It's a good idea to use the return value of send with sockets in a loop to make sure all the data has been sent/recieved, eg:
Code:
unsigned char *data;
int sz = // the data length
int total = 0, sent;
while (total < sz) {
sent = send(sock,&data[total],sz-total,0);
total += sent;
}