Send struct with double pointer to struct over networkI have to send this huge structure that represents the directory structure over network. It looks like this:
typedef struct{
char *name;
int count;
dir **subdir;
}dir;
I have to send this over network, which means I need to make a deep copy of this in a buffer and send it over TCP. I am pretty new to c and do not know how to make the copy of this whole hierarchy and especially how to reconstruct this on the other end. I am clear on how to handle network part. Please help.