示例#1
0
 private async Task NoticeServer(string token, DockerGameStatus status)
 {
     if (token == null)
     {
         await HttpAsync($"https://api.eesast.com/v1/rooms/{roomID}/status", this.token, "PUT", new JObject
         {
             ["status"] = (int)status
         });
     }
     else
     {
         await HttpAsync($"https://api.eesast.com/v1/rooms/{roomID}/join", this.token, "POST", new JObject
         {
             ["token"] = token
         });
     }
 }
示例#2
0
 private async Task NoticeServer(string token, DockerGameStatus status)
 {
     if (IsOffline)
     {
         return;
     }
     if (token == null)
     {
         await HttpAsync($"http://localhost:28888/v1/rooms/{roomID}", this.token, "PUT", new JObject
         {
             ["status"] = (int)status
         });
     }
     else
     {
         await HttpAsync($"http://localhost:28888/v1/rooms/{roomID}/join", token, "GET", null);
     }
 }