Dotnet version upgrade
Some checks failed
Build Mau & Deploy Mau / build (push) Failing after 1m2s
Build Mau & Deploy Mau / deploy (push) Has been skipped

This commit is contained in:
2024-07-13 00:01:43 +02:00
parent 25b7a8fb1e
commit 681cfa13bd
15 changed files with 173 additions and 142 deletions

View File

@@ -1,23 +1,17 @@
using System.Net.WebSockets;
using System.Text;
using Newtonsoft.Json;
using System.Text.Json.Serialization;
namespace MauMau_Server.Websockets;
public class ConnectionInstance
public class ConnectionInstance(string name, Guid id, WebSocket socket)
{
public Guid Id { get; set; }
public string Name { get; set; }
public Guid Id { get; set; } = id;
public string Name { get; set; } = name;
[JsonIgnore]
public WebSocket Socket { get; set; }
public ConnectionInstance(string name, Guid id, WebSocket socket)
{
Name = name;
Id = id;
Socket = socket;
}
public WebSocket Socket { get; set; } = socket;
/**
* <summary>
* Sends a message to the client. This method is asynchronous and formats the message to be ready to be sent.