def sendto(source, addr): """ Send items to a remote machine """ s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(addr) for pitem in gen_pickle(source): s.sendall(pitem) s.close()
def sendto(source, addr): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(addr) for pitem in gen_pickle(source): s.sendall(pitem) s.close()