WebSocketDemo icon indicating copy to clipboard operation
WebSocketDemo copied to clipboard

WebSocketDemo

Demo code for a blog post I wrote: Things I Wish Someone Told Me About ASP.NET Core WebSockets

The demo doesn't look pretty:

screenshot

But it might help you if you're trying to write a WebSocket handler and you want to compare your code to some running code.

Starting Points

Take a look at MessagePushHandler.cs.

Other files of interest:

  • app.js
  • AntiCswshTokenValidator.cs
  • SetAntiCswshCookie.cs