public static ILifecycle Create(RpcEndPoint endPoint, IAccountLoginService accountLoginService) { var port = new ServerPort(endPoint.Host, endPoint.Port, ServerCredentials.Insecure); var controller = new RpcServiceController(port); controller.RegisterService(token => AccountAuthentication.BindService(new AccountAuthenticationService(accountLoginService, token))); return(controller); }
public static ILifecycle Create(RpcEndPoint endPoint, IGameServerRegistrar gameServerRegistrar) { var port = new ServerPort(endPoint.Host, endPoint.Port, ServerCredentials.Insecure); var controller = new RpcServiceController(port); controller.RegisterService(token => GameServerRegistrar.BindService(new GameServerRegistrarService(gameServerRegistrar, token))); return(controller); }