def __init__(self, botname: str='vexbot', **kwargs):
        """
        `kwargs`:
            protocol:   'tcp'
            address: '*'
            chatter_publish_port: 4000
            chatter_subscription_port: [4001,]
            command_port: 4002
            request_port: 4003
            control_port: 4005
        """
        # Defaults. Can be overriden by the use of `kwargs`
        self.config = _get_default_port_config()
        # override the default with the `kwargs`
        self.config = {**self.config, **kwargs}
        self._service_name = botname
        self._logger = logging.getLogger(__name__)
        self._messaging_logger = MessagingLogger(botname)
        self.uuid = str(uuid.uuid1())
        self._logger.info(' uuid: %s', self.uuid)

        self.subscription_socket = None
        self.publish_socket = None
        self.command_socket = None
        self.control_socket = None
        self.request_socket = None
        self.pub_handler = LoopPubHandler(self)

        self.loop = IOLoop()
        self.scheduler = Scheduler()
        self._heartbeat_helper = _HeartbeatHelper(messaging=self)


        # Socket factory keeps the zmq context, default address and
        # protocol for socket creation.
        self._socket_factory = _SocketFactory(self.config['address'],
                                              self.config['protocol'],
                                              logger=self._logger,
                                              loop=self.loop)

        # converts from ports to zmq ip addresses
        self._config_convert_to_address_helper()
        self._address_map = _LRUCache(100)

        self.control = _Subject()
        self.command = _Subject()
        self.chatter = _Subject()
def __init__ ( self , botname : str = 'vexbot' , ** kwargs ) : self . config = _get_default_port_config ( ) self . config = { ** self . config , ** kwargs } self . _service_name = botname self . _logger = logging . getLogger ( __name__ ) self . _messaging_logger = MessagingLogger ( botname ) self . uuid = str ( uuid . uuid1 ( ) ) self . _logger . info ( ' uuid: %s' , self . uuid ) self . subscription_socket = None self . publish_socket = None self . command_socket = None self . control_socket = None self . request_socket = None self . pub_handler = LoopPubHandler ( self ) self . loop = IOLoop ( ) self . scheduler = Scheduler ( ) self . _heartbeat_helper = _HeartbeatHelper ( messaging = self ) self . _socket_factory = _SocketFactory ( self . config [ 'address' ] , self . config [ 'protocol' ] , logger = self . _logger , loop = self . loop ) self . _config_convert_to_address_helper ( ) self . _address_map = _LRUCache ( 100 ) self . control = _Subject ( ) self . command = _Subject ( ) self . chatter = _Subject ( )
`kwargs`:
            protocol:   'tcp'
            address: '*'
            chatter_publish_port: 4000
            chatter_subscription_port: [4001,]
            command_port: 4002
            request_port: 4003
            control_port: 4005