(source, destination)
| 933 | |
| 934 | |
| 935 | def forward(source, destination): |
| 936 | try: |
| 937 | bufsize = 1024 |
| 938 | bufdata = source.recv(bufsize) |
| 939 | while bufdata: |
| 940 | destination.sendall(bufdata) |
| 941 | bufdata = source.recv(bufsize) |
| 942 | finally: |
| 943 | destination.shutdown(socket.SHUT_WR) |
| 944 | |
| 945 | |
| 946 | def compute_checksum(filename, hashtype): |