Hosting Microsoft.ServiceModel.WebSockets.WebSocketService

1.6k Views Asked by At

I was reading this article about WCF Websockets, and there is a nice example of a WebSocket service using Microsoft.ServiceModel.WebSockets.WebSocketService, that looks perfect for a thing I want to do, clean and simple.

First of all, I have found it in a NuGet package named Microsoft.WebSockets, but it is from 2012 and states:

This preview package provides functionality for writing WebSocket-enabled server applications on Windows 8 using ASP.NET and WCF. Requires .NET 4.5 RC and Windows 8 RC.

So it seems a little bit out of date. Is it deprecated/abandoned or anything?

Also, I would like to use it to create a standalone Windows service that handles the connections from browsers, but I cannot find how to host it. The example shows how to do it in IIS, but I cannot find information at all about how to host it in a Console or Windows service application.

Any idea about how to use it?

Cheers.

1

There are 1 best solutions below

0
On

I believe WebSockets are included in .NET 4.5 in the System.Net.WebSockets namespace.

Hopefully this will point you in the right direction:

Using WebSockets in .NET 4.5 Part 3 (WCF)