title: Using fwrite on file descriptor / Convert file descriptor to file pointer
body: <p>Lately, I've been working on some small data serialization demos. However, I was wondering how to transfer binary data from a structure into a file descriptor.</p>
  
  <p>I am aware that the only (simple) way to do this is through <code>fwrite</code> (if <code>write</code> does this, then please say so), so is there either:</p>
  
  <p>A) An <code>fwrite</code> call to use on file descriptors?</p>
  
  <p>or</p>
  
  <p>B) A way to create a <code>FILE *</code> around an existing file descriptor/socket, like the opposite of <code>fileno</code>?</p>