-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathProgram.cs
38 lines (32 loc) · 973 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WebSocket_Overlay
{
class Program
{
static WebSocketServer WS = new WebSocketServer();
static void Main(string[] args)
{
Console.WriteLine(RGBConverter(Color.Red));
WS.Listen(3030);
WS.ClientConnected += ClientConnected;
Console.Read();
}
private static string RGBConverter(System.Drawing.Color c)
{
return "RGB(" + c.R.ToString() + "," + c.G.ToString() + "," + c.B.ToString() + ")";
}
private static void ClientConnected(object sender, WebSocketSession e)
{
e.TextMessageReceived += E_TextMessageReceived;
}
private static void E_TextMessageReceived(object sender, string e)
{
// 100#new#1920#966
}
}
}