我正在尝试让服务器检查文件是否存在
以下内容来自服务器:
filename = sock.recv(1024)
strfilename = b'filename'
#if file exist,
if os.path.exists(filename):
sock.send("fEXISTS" + (os.path.getsize(strfilename)))
clientReply = sock.recv(1024)
以下是来自客户的信息
filename = raw_input("What file do you wish to download? -> ")
if filename != 'q':
ssl_sock.send(filename)
目前没有回答
相关问题 更多 >
编程相关推荐