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.
I am aware that the only (simple) way to do this is through fwrite
(if write
does this, then please say so), so is there either:
A) An fwrite
call to use on file descriptors?
or
B) A way to create a FILE *
around an existing file descriptor/socket, like the opposite of fileno
?