Send a file through sockets in Python

前端 未结 5 2167
温柔的废话
温柔的废话 2020-12-01 01:43

I\'m trying to make a program in Python that implements sockets, each client sends a PDF file and the server receives it and the title is changed to \"file_number.pdf\" (i.e

5条回答
  •  心在旅途
    2020-12-01 02:06

    You are closing the server socket (s in your code) after handling the first client connection. Thus only one client is ever handled by your server. Make a loop around accept and reading from the sc.

提交回复
热议问题