(source, destination)
| 52 | |
| 53 | |
| 54 | def forward(source, destination): |
| 55 | string = ' ' |
| 56 | while string: |
| 57 | string = source.recv(1024) |
| 58 | if string: |
| 59 | destination.sendall(string) |
| 60 | else: |
| 61 | #source.shutdown(socket.SHUT_RD) |
| 62 | destination.shutdown(socket.SHUT_WR) |
| 63 | |
| 64 | if __name__ == "__main__": |
| 65 | args = argv[1:] |