title: C sockets send/recv buffer type
body: <p>I'm working with unix sockets, and I can send() and recv() data when my buffer is of type char (ie. sending and receiving strings).  I used Beej's guide to sockets, and the examples used were for send'ing/recv'ing strings.</p>
  
  <p>Now I want to send/recv data of different types in one message.<br>
  For example, say in one message I want to send an integer, a string, a double and a float.
  How should I go about doing this? More specifically, of what type should my message 'buffer' be?</p>
  
  <p>The prototypes for send and recv:</p>
  
  <pre><code>int recv (int socket, void *buffer, size_t size, int flags)
  int send (int socket, void *buffer, size_t size, int flags)
  </code></pre>
  
  <p>I don't have too much experience with C/C++ and pointers, so this is probably a noob question.</p>
  
  <p>If anyone can guide me in the right direction, I'd really appreciate it.
  Thanks</p>