реализован производитель модулей сериализации

This commit is contained in:
micialware committed 2025-02-14 20:24:04 +03:00
1 parent c370142e7a
commit b4d4837f9d
5 files changed
+56 -4

No files matched your search

@@ -16,6 +16,11 @@ public class StreamBasedInteractionModule : IInteractionModule
_serialisationModule.SendWelcomeMessage(id);
}
public Stream GetSource(int clientId)
{
return _streams.GetValueOrDefault(clientId, Stream.Null);
}
public void SendTo(int clientId, byte[] message)
{
if (!_streams.TryGetValue(clientId, out var stream))