Well, I've see this question about my problem and the solution seems to be good. Send and Receive a file in socket programming in Linux with C/C++ (GCC/G++)
Well. My goal is to receive a txt file and after receiving it, I want to store it into a path. I have now a question: when I receive the bytes through the recv function, how can I merge all bytes into a txt file?