public async Task SendMessageToPeers(Message message, bool IsAlsoInternalMessage = true) { await JSRuntime.InvokeVoidAsync("sendMessageToAllPeers", message); if (IsAlsoInternalMessage) { OnNewGameMessage?.Invoke(message); } }
public PeerConnection(IJSRuntime jSRuntime) { JSRuntime = jSRuntime; OnNewMessage = (message) => OnNewGameMessage?.Invoke(message); OnSetPeerID = (peerID) => PeerID = peerID; }