Add basic send and receive test

This commit is contained in:
Dean Herbert
2020-10-22 18:10:27 +09:00
parent c834aa6051
commit 1ab6f41b3b
2 changed files with 267 additions and 0 deletions

View File

@ -37,6 +37,8 @@ namespace osu.Game.Online.Spectator
private readonly SpectatorState currentState = new SpectatorState();
public event Action<FrameDataBundle> OnNewFrames;
[BackgroundDependencyLoader]
private void load()
{
@ -145,6 +147,7 @@ namespace osu.Game.Online.Spectator
Task ISpectatorClient.UserSentFrames(string userId, FrameDataBundle data)
{
Console.WriteLine($"{connection.ConnectionId} Received frames from {userId}: {data.Frames.First()}");
OnNewFrames?.Invoke(data);
return Task.CompletedTask;
}