yep
This commit is contained in:
@@ -11,7 +11,7 @@ namespace Shogi.UI.Shared;
|
||||
public class ShogiSocket : IDisposable
|
||||
{
|
||||
public event AsyncEventHandler? OnSessionCreated;
|
||||
public event AsyncEventHandler? OnSessionJoined;
|
||||
public event AsyncEventHandler<SessionJoinedByPlayerSocketMessage>? OnSessionJoined;
|
||||
public event AsyncEventHandler<PlayerHasMovedMessage>? OnPlayerMoved;
|
||||
|
||||
private readonly ClientWebSocket socket;
|
||||
@@ -76,7 +76,8 @@ public class ShogiSocket : IDisposable
|
||||
case SocketAction.SessionJoined:
|
||||
if (this.OnSessionJoined is not null)
|
||||
{
|
||||
await this.OnSessionJoined();
|
||||
var args = JsonSerializer.Deserialize<SessionJoinedByPlayerSocketMessage>(memory[..result.Count], serializerOptions);
|
||||
await this.OnSessionJoined(args!);
|
||||
}
|
||||
break;
|
||||
case SocketAction.PieceMoved:
|
||||
|
||||
Reference in New Issue
Block a user