/// <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)); }
public StreamRequestCall(Frontend.FrontendClient client) { call = client.SendTaskStream(); }
public StreamResponseCall(Frontend.FrontendClient client, int number) { call = client.GetResultStream(new AskNumber { Number = number }); }
public OpenMatchClient(string endpoint) { this.channel = new Channel(endpoint, ChannelCredentials.Insecure); this.client = new Frontend.FrontendClient(channel); }
public OpenMatchClient(Frontend.FrontendClient client) { this.client = client; }