参考:https://www.cnblogs.com/VseYoung/p/socket_1.html
参考 https://blog.csdn.net/a19990412/article/details/80919703
参考:https://www.cnblogs.com/xiaokang01/p/9069048.html
方法一:
接收
fileinfo_size=struct.calcsize('128sl') buf = conn.recv(fileinfo_size) if buf: filename, filesize = struct.unpack('128sl', buf) fn = filename.decode().strip('