Add project files.

This commit is contained in:
Tucker
2022-02-18 16:08:20 -05:00
parent abd3362d42
commit 230917eb75
22 changed files with 1429 additions and 0 deletions

32
WebSocket.cs Normal file
View File

@@ -0,0 +1,32 @@
using System;
using WebSocketSharp;
using WebSocketSharp.Server;
namespace ws
{
// Token: 0x02000008 RID: 8
internal class WebSocket
{
// Token: 0x06000012 RID: 18 RVA: 0x0000418C File Offset: 0x0000238C
public WebSocket()
{
WebSocketServer webSocketServer = new WebSocketServer(string.Format("ws://localhost:20161"));
webSocketServer.AddWebSocketService<WebSocket.NotificationV2>("/api/notification/v2");
webSocketServer.AddWebSocketService<WebSocket.NotificationV2>("/hub/v1");
webSocketServer.Start();
Console.WriteLine("WebSocket.cs has started.");
Console.WriteLine("WebSocket.cs is listening.");
}
// Token: 0x02000009 RID: 9
public class NotificationV2 : WebSocketBehavior
{
// Token: 0x06000013 RID: 19 RVA: 0x0000209D File Offset: 0x0000029D
protected override void OnMessage(MessageEventArgs e)
{
Console.WriteLine("WebSocket.cs called for. Not yet implemented.");
base.Send(Notification.ProcessRequest(e.Data));
}
}
}
}