async def start_server(self, on_connect: Callable=None):
    if (self._local_type in [NodeType.WALLET, NodeType.HARVESTER, NodeType.TIMELORD]):
        return None
    self.app = web.Application()
    self.on_connect = on_connect
    routes = [web.get('/ws', self.incoming_connection)]
    self.app.add_routes(routes)
    self.runner = web.AppRunner(self.app, access_log=None, logger=self.log)
    (await self.runner.setup())
    authenticate = (self._local_type not in (NodeType.FULL_NODE, NodeType.INTRODUCER))
    if authenticate:
        ssl_context = ssl_context_for_server(self.ca_private_crt_path, self.ca_private_key_path, self._private_cert_path, self._private_key_path)
    else:
        (self.p2p_crt_path, self.p2p_key_path) = public_ssl_paths(self.root_path, self.config)
        ssl_context = ssl_context_for_server(self.greenberry_ca_crt_path, self.greenberry_ca_key_path, self.p2p_crt_path, self.p2p_key_path)
    self.site = web.TCPSite(self.runner, port=self._port, shutdown_timeout=3, ssl_context=ssl_context)
    (await self.site.start())
    self.log.info(f'Started listening on port: {self._port}')
async def start_server(self, on_connect: Callable=None):
    if (self._local_type in [NodeType.WALLET, NodeType.HARVESTER, NodeType.TIMELORD]):
        return None
    self.app = web.Application()
    self.on_connect = on_connect
    routes = [web.get('/ws', self.incoming_connection)]
    self.app.add_routes(routes)
    self.runner = web.AppRunner(self.app, access_log=None, logger=self.log)
    (await self.runner.setup())
    authenticate = (self._local_type not in (NodeType.FULL_NODE, NodeType.INTRODUCER))
    if authenticate:
        ssl_context = ssl_context_for_server(self.ca_private_crt_path, self.ca_private_key_path, self._private_cert_path, self._private_key_path)
    else:
        (self.p2p_crt_path, self.p2p_key_path) = public_ssl_paths(self.root_path, self.config)
        ssl_context = ssl_context_for_server(self.greenberry_ca_crt_path, self.greenberry_ca_key_path, self.p2p_crt_path, self.p2p_key_path)
    self.site = web.TCPSite(self.runner, port=self._port, shutdown_timeout=3, ssl_context=ssl_context)
    (await self.site.start())
    self.log.info(f'Started listening on port: {self._port}')