title: msgpack to pack structures
body: <p>I have the following structure (among many others) and I want to send it over a socket. </p>
  
  <pre><code>struct Position
  {
      float x; // position selon x
      float y; // position selon y
      float theta; // orientation % z
      Position (float x_, float y_, float theta_): x(x_), y(y_), theta(theta_){}
      Position(){}
  };
  </code></pre>
  
  <p>But first, for decoding purposes, I thought about using <a href="http://msgpack.org/" rel="nofollow">msgpack</a> library for coding and decoding as it may simplify my task greatly.</p>
  
  <p>Only problem is that I couldn't figure out how exactly can I do that, almost all the examples available here and elsewhere are trying just to pack conventional buffers (vectors, lists...) but no structure packing I can found !</p>
  
  <p>So, Can it be done and how is that do-able ?</p>
  
  <p>PS : the structure example is simplified, I got some that are seriously more complicated.</p>
  
  <p>Thanks.</p>