import socket


def connect(address):
    """Connect to given address and set socket non blocking."""
    try:
        sock = socket.socket()
        sock.connect(address)
        sock.setblocking(False)
    except socket.error:
        return None
    return sock