python server socket file transfer
bingbong3334 at gmail.com writes:
> On Wednesday, January 10, 2018 at 9:07:33 AM UTC+2, dieter wrote:
>> bingbong3334 at gmail.com writes:
>> > how much client can i handel whit this code what the amount of client that i can handel
>> > the size of the file is 716 kb
>> > ...
>> > self.sock.send(l)
>> Please read the documentation for *send* in the "socket" module:
>> it tells you that "send" (in contrast to "sendall") is *not* guarantied
>> to send the complete *l* (there is no guarantee how much is sent);
>> the return value of "send" tells you how many bytes have been sent.
> bro i dont ask about if it works or not or what you say is not right i ask how much he can handel...
This depends on implementation details of your network package (and maybe
other even less stable things). Thus, there is no reliable anwser
to your question.
And you do not need an anwser: use "sendall" or look on the "send"
return value to learn how much has been transmitted (and use subsequent
"send"'s to transmit the rest).