10 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
11 s.connect((HOST, PORT))
14 sbuf = buffer.Buffer(s)
17 # files = input('Enter file(s) to send: ')
18 # files_to_send = files.split()
21 # for file_name in files_to_send:
23 sbuf.put_utf8(file_name)
25 file_size = os.path.getsize(file_name)
26 sbuf.put_utf8(str(file_size))
28 with open(file_name, 'rb') as f:
29 sbuf.put_bytes(f.read())