title: Send any type of data over UDP
body: <p>I tried searching everywhere but no luck. Here is my problem:</p>
  
  <p>I have a UDP socket, which can send data to any IP address through any port (tested and confirmed working).</p>
  
  <p>I read many tutorials, but they were all manipulating <code>char*[]</code>, they did not specify how to decrypt it.</p>
  
  <p>What I would like to do (pseudo code):</p>
  
  <p>Client:</p>
  
  <pre><code>Class my_class;
  send (..., my_class, sizeof(my_class),...)
  </code></pre>
  
  <p>Server:</p>
  
  <pre><code>receive (sender, buffer, sizeof (buffer))
  and do something like
  Class my_class = (Class) buffer
  </code></pre>
  
  <p>So I my server can analyze the content of the buffer.</p>
  
  <p>But I'm lost with pointers, and all I can send is <code>char*[]</code>, so I don't know how to convert back and forth.</p>