ping on map feature complete
This commit is contained in:
parent
17cce56866
commit
bce97de302
19 changed files with 1002 additions and 233 deletions
|
@ -155,6 +155,11 @@ namespace Sledgemapper
|
|||
p.Position = player.Position;
|
||||
}
|
||||
});
|
||||
|
||||
Connection.On<Ping>("Ping", (ping) =>
|
||||
{
|
||||
SessionData.Pings.TryAdd(Guid.NewGuid(), ping);
|
||||
});
|
||||
}
|
||||
|
||||
private Task<string> GetToken()
|
||||
|
@ -233,6 +238,14 @@ namespace Sledgemapper
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
internal async Task Ping(Tile hoveredTile)
|
||||
{
|
||||
if (Connection!=null && Connection.State == HubConnectionState.Connected)
|
||||
{
|
||||
await Connection.InvokeAsync("Ping",SessionData.SessionName, hoveredTile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class AuthenticatedHttpClientHandler : HttpClientHandler
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue