Example #1
0
    async def start_grpc_server(self):
        from shadowsocks.services import AioShadowsocksServicer

        self.grpc_server = Server([AioShadowsocksServicer()], loop=self.loop)
        await self.grpc_server.start(self.grpc_host, self.grpc_port)
        logging.info(f"Start Grpc Server on {self.grpc_host}:{self.grpc_port}")
Example #2
0
    async def _start_grpc_server(self):

        self.grpc_server = Server([AioShadowsocksServicer()], loop=self.loop)
        listen(self.grpc_server, RecvRequest, logging_grpc_request)
        await self.grpc_server.start(self.grpc_host, self.grpc_port)
        logging.info(f"Start grpc Server on {self.grpc_host}:{self.grpc_port}")
Example #3
0
async def start_grpc_server(loop, host="0.0.0.0", port=5000):
    server = Server([AioShadowsocksServicer()], loop=loop)
    with graceful_exit([server], loop=loop):
        await server.start(host, port)
        logging.info(f"Start Grpc Server on {host}:{port}")
        await server.wait_closed()