Beispiel #1
0
 void Destory()
 {
     if (test_cli != null)
     {
         this.test_cli = null;
         this.main_room_chan.ShutdownAsync().Wait();
     }
     if (create_auth_cli != null)
     {
         this.create_auth_cli = null;
         this.auth_chan.ShutdownAsync().Wait();
     }
 }
Beispiel #2
0
    public bool TryConnectAuthServ(string ip_address, int port)
    {
        try {
            this.auth_chan = new Channel(
                ip_address, port, ChannelCredentials.Insecure
                );
            this.create_auth_cli = new CreditsAuth.CreditsAuthClient(this.auth_chan);

            ConfigForm.Connector = "grpc";
            ConfigForm.Host      = ip_address;
            ConfigForm.Port      = 11000;
            return(true);
        } catch (RpcException e) {
            Debug.LogError(e);
            return(false);

            throw;
        }
    }