You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
516 B
27 lines
516 B
using Fleck;
|
|
using RSND.Core;
|
|
|
|
namespace RSND;
|
|
|
|
public static class RsndMain
|
|
{
|
|
public static Database Db = new();
|
|
|
|
public static void Run()
|
|
{
|
|
WebSocketServer server = new WebSocketServer("ws://0.0.0.0:7878");
|
|
|
|
FleckLog.Level = LogLevel.Error;
|
|
|
|
server.Start(socket =>
|
|
{
|
|
socket.OnOpen = () =>
|
|
{
|
|
var dbClient = new DbClient(socket);
|
|
dbClient.Handle();
|
|
};
|
|
});
|
|
|
|
Database.Loop();
|
|
}
|
|
}
|