Ping added in client
This commit is contained in:
@@ -40,6 +40,10 @@ namespace YJMPD_UWP.Model
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case Command.Hi:
|
||||
Debug.WriteLine("Keep alive message received!");
|
||||
SendHi();
|
||||
break;
|
||||
case Command.PlayerJoined:
|
||||
Debug.WriteLine("Played joined");
|
||||
PlayerJoined(o[Command.PlayerJoined.ToString()].ToString());
|
||||
@@ -118,6 +122,12 @@ namespace YJMPD_UWP.Model
|
||||
});
|
||||
}
|
||||
|
||||
public async Task SendHi()
|
||||
{
|
||||
JObject obj = JObject.FromObject(new { command = Command.Hi.ToString() });
|
||||
await App.Network.Write(obj.ToString(Formatting.None));
|
||||
}
|
||||
|
||||
//API stuff
|
||||
public async Task<bool> JoinGame()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user