- exit_err(0 == j, "Failed to write to server fifo.");
- exit_trouble(-1 == close(fd_out), f_name, "close()");
+ while (EOF != (test = try_fgetc(world.file_server_out, f_name)));
+ * last_server_answer_time = time(0);
+}
+
+
+
+extern void send(char * msg)
+{
+ char * f_name = "send()";
+ uint32_t msg_size = strlen(msg) + 1;
+ char * err = "send() tries to send message larger than PIPE_BUF bytes.";
+ exit_err(msg_size > PIPE_BUF, err);
+ try_fwrite(msg, strlen(msg), 1, world.file_server_in, f_name);
+ try_fputc('\n', world.file_server_in, f_name);
+ fflush(world.file_server_in);