コード例 #1
0
 /// <summary>
 /// Matchmaker
 /// </summary>
 /// <param name="endpoint"></param>
 /// <param name="onSuccessCallback">If a match is found, this callback will provide the connection information</param>
 /// <param name="onErrorCallback">If matchmaking fails, this callback will provided some failure information</param>
 public Matchmaker(string endpoint, SuccessCallback onSuccessCallback = null, ErrorCallback onErrorCallback = null)
 {
     this.endpoint        = endpoint;
     channel              = new Channel(endpoint, ChannelCredentials.Insecure);
     m_client             = new Frontend.FrontendClient(channel);
     this.successCallback = onSuccessCallback;
     this.errorCallback   = onErrorCallback;
     ticket = TicketUtil.GenerateTicket(RandomString(6, true));
 }
コード例 #2
0
 public StreamRequestCall(Frontend.FrontendClient client)
 {
     call = client.SendTaskStream();
 }
コード例 #3
0
 public StreamResponseCall(Frontend.FrontendClient client, int number)
 {
     call = client.GetResultStream(new AskNumber {
         Number = number
     });
 }
コード例 #4
0
ファイル: OpenMatchClient.cs プロジェクト: zhany/FPSSample
        public OpenMatchClient(string endpoint)
        {
            this.channel = new Channel(endpoint, ChannelCredentials.Insecure);

            this.client = new Frontend.FrontendClient(channel);
        }
コード例 #5
0
ファイル: Example.cs プロジェクト: zhany/FPSSample
 public OpenMatchClient(Frontend.FrontendClient client)
 {
     this.client = client;
 }