Full WebSocket support is coming with .NET Standard 2.0, which has now been delayed until Q3. In the meantime, there are still a few options to work with...
- Third Party
- Microsoft
If you want to use Microsoft.AspNetCore.WebSockets.Server, I have added a middle ware wrapper that feel a lot more like Fleck:
public void Configure(IApplicationBuilder app)
{
app.UseWebSockets();
app.UseWebSocketHandler("test", connection =>
{
// Register your listeners here
connection.OnMessage = m =>
{
if (m == "hi")
connection.SendAsync("bye");
};
});
}
Enjoy,
Tom