i had the following working websocket
using WebSocketSharp.Server;
string adress = "0.0.0.0:7890";
WebSocketServer server = new WebSocketServer($"ws://{adress}");
server.AddWebSocketService<PosicaoNotificacaoService>("/", () => new PosicaoNotificacaoService());
but i cant use ws in a https website so the solution was to use wss:
using WebSocketSharp.Server;
string adress = "0.0.0.0:7890";
WebSocketServer server = new WebSocketServer($"wss://{adress}");
server.AddWebSocketService<PosicaoNotificacaoService>("/", () => new PosicaoNotificacaoService());
however the connection fails to start with wss
on my client(js) i have
this.websoket = new WebSocket('wss://my-ip:7890/');