samples icon indicating copy to clipboard operation
samples copied to clipboard

Give a little better WebSocketSample

Open mika76 opened this issue 6 years ago • 0 comments

The Web Socket sample is very contrived. using statements which shorten long delegates which use tuples and everything works in a weird async task of an echo server....

I've been trying to figure out how to write a simple web socket server to send events (ie - not respond to messages but send events from my self hosted owin console app) but this sample is just not good.

Please could you guys write a better one? Maybe properly structured which use properly named classes and methods (please no usings shortcuts or tuples) and maybe give some more info on how to do things like respond to a websocket message (in this current sample) but also how to do broadcasts and such... 🙏

Oh and please don't tell me to use SignalR - I know I can but I just want websockets and signalr does not do "just websockets" well...

mika76 avatar Sep 18 '18 14:09 mika76