def loopback(server_factory=None, client_factory=None):
    '\n    Create a connected socket pair and force two connected SSL sockets\n    to talk to each other via memory BIOs.\n    '
    if (server_factory is None):
        server_factory = loopback_server_factory
    if (client_factory is None):
        client_factory = loopback_client_factory
    (server, client) = socket_pair()
    server = server_factory(server)
    client = client_factory(client)
    handshake(client, server)
    server.setblocking(True)
    client.setblocking(True)
    return (server, client)
Create a connected socket pair and force two connected SSL sockets
to talk to each other via memory BIOs.
def loopback(server_factory=None, client_factory=None):
    '\n    Create a connected socket pair and force two connected SSL sockets\n    to talk to each other via memory BIOs.\n    '
    if (server_factory is None):
        server_factory = loopback_server_factory
    if (client_factory is None):
        client_factory = loopback_client_factory
    (server, client) = socket_pair()
    server = server_factory(server)
    client = client_factory(client)
    handshake(client, server)
    server.setblocking(True)
    client.setblocking(True)
    return (server, client)