mirror of
https://github.com/Stone-Red-Code/RemSox.git
synced 2026-09-04 09:06:23 +02:00
Reorganize project structure
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using RemSox.Shared.Networking;
|
||||
|
||||
namespace RemSox.Viewer;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static async Task Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("RemSox RDP Viewer");
|
||||
Console.WriteLine("=================");
|
||||
|
||||
if (args.Length < 2)
|
||||
{
|
||||
Console.WriteLine("Usage: RemSox.Viewer <host> <port>");
|
||||
return;
|
||||
}
|
||||
|
||||
string host = args[0];
|
||||
int port = int.Parse(args[1]);
|
||||
|
||||
TcpRpcClient client = new();
|
||||
client.ListenTo("RenderCmd", async (payload) =>
|
||||
{
|
||||
Console.WriteLine($"Received render command: {payload.Length} bytes");
|
||||
});
|
||||
|
||||
try
|
||||
{
|
||||
client.Connect(host, port);
|
||||
Console.WriteLine($"Connected to {host}:{port}");
|
||||
|
||||
await client.RequestAsync("SyncRequest", []);
|
||||
Console.WriteLine("Sync request sent.");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Error: {ex.Message}");
|
||||
}
|
||||
|
||||
Console.WriteLine("Press Ctrl+C to exit.");
|
||||
await Task.Delay(Timeout.Infinite);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user