This repository is a simple demostration how websockets work in ASP.NET Core. One of the important codes here is the middleware file where it has Invoke method that handles Request and Response.
Clone this project:
git clone https://github.com/deanilvincent/AspNetCoreWithWebSockets.git