def forward()

in resources/code/my-first-enclave/secure-local-channel/traffic_forwarder.py [0:0]


def forward(source, destination):
    string = ' '
    while string:
        try:
            string = source.recv(1024)
            if string:
                destination.sendall(string)
            else:
                source.shutdown(socket.SHUT_RD)
                destination.shutdown(socket.SHUT_WR)
        except:
            print("") # TODO Muted Forwarder Error - ConnectionResetError: [Errno 104] Connection reset by peer