title: send struct in mq_send
body: <p>I am using POSIX IPC and according to the documentation - <a href="http://man7.org/linux/man-pages/man3/mq_send.3.html" rel="noreferrer">http://man7.org/linux/man-pages/man3/mq_send.3.html</a></p>
  
  <p>mq_send() method only sends char* data and mq_recv() recieves only character data.
  However, I want to send a custom struct to my msg queue and on the receiving end, I want to get the struct.</p>
  
  <p>sample struct:</p>
  
  <pre><code>struc Req
  {
    pid_t pid;
    char data[4096];
  }
  </code></pre>
  
  <p>So, does anyone know how to accomplish this in C lang? </p>