import socket


def connect(url, port):
    """ Creates and returns a socket that is connected to the specified URL.
    
    This socket should be used for only ONE transfer (one send & one receive).

    Parameters
    ----------
    url : string
        the URL that a socket will attempt to bind to
    port : int
        the port that the socket will attempt to bind to

    Returns
    -------
    clientSocket : socket, None
        the socket that is binded to the URL, or None if it could not be created
    """
    try:
        client_socket = socket.create_connection((url,port),timeout=10)
        return client_socket
    except Exception as err:
        return None