added PC struct
This commit is contained in:
@@ -1,19 +1,28 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
|
using System.Runtime.Intrinsics.X86;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace RH_Engine
|
namespace RH_Engine
|
||||||
{
|
{
|
||||||
|
|
||||||
internal class Program
|
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)
|
private static void Main(string[] args)
|
||||||
{
|
{
|
||||||
TcpClient client = new TcpClient("145.48.6.10", 6666);
|
TcpClient client = new TcpClient("145.48.6.10", 6666);
|
||||||
|
|
||||||
WriteTextMessage(client, "{\r\n\"id\" : \"session/list\"\r\n}");
|
WriteTextMessage(client, "{\r\n\"id\" : \"session/list\"\r\n}");
|
||||||
ReadPrefMessage(client.GetStream());
|
ReadPrefMessage(client.GetStream());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void WriteTextMessage(TcpClient client, string message)
|
public static void WriteTextMessage(TcpClient client, string message)
|
||||||
@@ -47,5 +56,22 @@ namespace RH_Engine
|
|||||||
|
|
||||||
return Encoding.ASCII.GetString(buffer, 0, totalRead);
|
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