added PC struct
This commit is contained in:
@@ -1,19 +1,28 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net.Sockets;
|
||||
using System.Runtime.Intrinsics.X86;
|
||||
using System.Text;
|
||||
|
||||
namespace RH_Engine
|
||||
{
|
||||
|
||||
internal class Program
|
||||
{
|
||||
private static PC[] PCs = {
|
||||
new PC("DESKTOP-M2CIH87", "Fabian"),
|
||||
new PC("T470S", "Shinichi"),
|
||||
new PC("NA", "Sem"),
|
||||
new PC("NA", "Wouter"),
|
||||
new PC("NA", "Ralf"),
|
||||
new PC("NA", "Bart") };
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
TcpClient client = new TcpClient("145.48.6.10", 6666);
|
||||
|
||||
WriteTextMessage(client, "{\r\n\"id\" : \"session/list\"\r\n}");
|
||||
ReadPrefMessage(client.GetStream());
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void WriteTextMessage(TcpClient client, string message)
|
||||
@@ -47,5 +56,22 @@ namespace RH_Engine
|
||||
|
||||
return Encoding.ASCII.GetString(buffer, 0, totalRead);
|
||||
}
|
||||
|
||||
private static void CreateTunnel()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public readonly struct PC
|
||||
{
|
||||
public PC(string host, string user)
|
||||
{
|
||||
this.host = host;
|
||||
this.user = user;
|
||||
}
|
||||
public string host { get; }
|
||||
public string user { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user