LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   prepare a proper msg (https://www.linuxquestions.org/questions/linux-networking-3/prepare-a-proper-msg-238600/)

cynthia 10-04-2004 09:11 AM

prepare a proper msg
 
Hi,

I need to send over my TCP network a struct (struct X), but function recv accepts the parameter to send as char* buf.

is there a proper way to cast a struct into a char* or should I prepare a special function that transfers a struct to char* (by concatenating all data members of struct into a char*)?

thanks


All times are GMT -5. The time now is 12:43 AM.