Socket send/receive implementations;

 - read, write, write_file