def returnConnected(server, client):
 cio = StringIO()
 sio = StringIO()
 client.makeConnection(FileWrapper(cio))
 server.makeConnection(FileWrapper(sio))
 pump = IOPump(client, server, cio, sio)
 pump.flush()
 pump.flush()
 return pump

def returnConnected ( server , client ) : cio = StringIO ( ) sio = StringIO ( ) client . makeConnection ( FileWrapper ( cio ) ) server . makeConnection ( FileWrapper ( sio ) ) pump = IOPump ( client , server , cio , sio ) pump . flush ( ) pump . flush ( ) return pump
take two protocol instances and connect them .