mirror of
https://github.com/Stone-Red-Code/RemSox.git
synced 2026-09-06 23:41:33 +02:00
Replace string element render types with RenderCommandType enum, decompose UI elements (Button, CheckBox, chrome) into drawing primitives via ToPrimitives(), emit per-element commands on flush, and move composite into IRenderSource.
This commit is contained in:
@@ -87,6 +87,24 @@ public class TcpRpcServer(IPacketCrypto? crypto = null) : TcpRpcBase(crypto)
|
||||
return Task.WhenAll(sendTasks);
|
||||
}
|
||||
|
||||
/// <summary> Broadcasts raw binary payload to all connected clients. </summary>
|
||||
public Task SendRawToAll(string type, byte[] payload)
|
||||
{
|
||||
List<Task> sendTasks = [];
|
||||
|
||||
foreach (TcpConnection conn in connections.Keys)
|
||||
{
|
||||
sendTasks.Add(SendRaw(conn, new TcpMessage
|
||||
{
|
||||
Type = type,
|
||||
RequestId = Guid.NewGuid().ToString(),
|
||||
Payload = payload
|
||||
}));
|
||||
}
|
||||
|
||||
return Task.WhenAll(sendTasks);
|
||||
}
|
||||
|
||||
protected override void OnConnectionClosed(TcpConnection conn)
|
||||
{
|
||||
_ = connections.TryRemove(conn, out _);
|
||||
|
||||
Reference in New Issue
Block a user