Multi Client Support - Needs Update Post Socket to support Multiple "Clients" not in a single Bus.

This commit is contained in:
2026-03-20 22:48:04 -04:00
parent 44fa9a8bb2
commit 2dfc898e8a
4 changed files with 164 additions and 43 deletions

View File

@@ -0,0 +1,25 @@
namespace RelayClient;
public static class ChatSimulator
{
public static event Action<ChatMessage>? MessageSent;
public static void Send(string senderUsername, string text)
{
var message = new ChatMessage
{
SenderUsername = senderUsername,
Text = text,
Timestamp = DateTime.Now
};
MessageSent?.Invoke(message);
}
}
public sealed class ChatMessage
{
public required string SenderUsername { get; set; }
public required string Text { get; set; }
public required DateTime Timestamp { get; set; }
}