'Creates and returns Connection class (or subclass) instance.
For the receiver, sender, and dispatcher parameters, pass in
an object instance for those duties; leave as None to have new
instances constructed.
@param host name of host for connection; default is localhost
@param port port number for connection; default is 7496
@param clientId client identifier to send when connected
@param receiver=None object for reading messages
@param sender=None object for writing requests
@param dispatcher=None object for dispatching messages
@return Connection (or subclass) instance'

@classmethod
def create(cls, host='localhost', port=7496, clientId=0, receiver=None, sender=None, dispatcher=None):

    dispatcher = (Dispatcher() if (dispatcher is None) else dispatcher)
    receiver = (Receiver(dispatcher) if (receiver is None) else receiver)
    sender = (Sender(dispatcher) if (sender is None) else sender)
    return cls(host, port, clientId, receiver, sender, dispatcher)
