Answer the question
In order to leave comments, you need to log in
How can I stop file transfers over the network before a certain event occurs?
Good day, can anyone tell me how to stop the transfer of files until the server gives the client a command?
There is a client and a server, text files are transmitted from the client and the server, but the server spends more time accepting and saving them, so it turns out that all the text from all files ends up in one file, the rest are just empty. I set time.sleep(1) and everything is fine, but this is some kind of patch, I want to do it more competently. Maybe there are standard tools in python 3 to implement this?
Answer the question
In order to leave comments, you need to log in
one file, one transfer - one socket, at the end - closing
opening and working with the socket as a separate thread thread.start_new_thread (....)
, the client, having transferred the file, initiates a new connection, the server continues processing the received information in one stream, and in the new stream receives the next file. After saving the file, the 1st thread ends. and the 2nd continues to receive.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question