title: General Socket Question - Transferring C++ Structs from Java to C++
body: <p>I have a general socket programming question for you.</p>
  
  <p>I have a C struct called Data:</p>
  
  <pre><code>struct data {
        double speed;
        double length; 
        char carName[32];
        struct Attribs;
  }
  
  struct Attribs {
        int color;
  }
  </code></pre>
  
  <p>I would like to be able to create a similar structure in Java, create a socket, create the data packet with the above struct, and send it to a C++ socket listener.</p>
  
  <p>What can you tell me about having serialized data (basically, the 1's and 0's that are transferred in the packet).  How does C++ "read" these packets and recreate the struct? How are structs like this stored in the packet?</p>
  
  <p>Generally, anything you can tell me to give me ideas on how to solve such a matter.</p>
  
  <p>Thanks!</p>