Alex Rivera | Logout

Confused by Microsoft WebSockets namespaces

Asked 2011-10-24T12:50:49.907
49

So far, in tutorials, blogs, and official documentation, I've seen:

  • Microsoft.Web.WebSockets
    • Obtained from NuGet
    • The assembly is Microsoft.WebSockets, but the Namespace is Microsoft.Web.WebSockets
    • Last updated 14 Sept 2011
    • Contains WebSocketHandler, WebSocketCollections, WebSocketExtensions
  • System.Web.WebSockets
    • Part of .NET 4.5 and available in Visual Studio 11 Developer Preview
    • Contains AspNetWebSocket, AspNetWebSocketContext, AspNetWebSocketOptions classes
    • Documentation on MSDN
  • System.Net.WebSockets
    • Thanks Ladislav Mrnka for pointing this one out
    • Part of .NET 4.5 and available in Visual Studio 11 Developer Preview
    • Contains WebSocket, HttpListenerWebSocketContext and more
    • Documentation on MSDN
  • System.ServiceModel.WebSockets
    • I must have imagined I'd seen this one somewhere, can't find it now
  • Microsoft.ServiceModel.WebSockets
    • Obtained from html5labs.interoperabilitybridges.com/....
    • Installed into [Program Files]\Microsoft SDKs\WCF WebSockets\11.06.22\bin
    • Contains WebSocketHost, WebSocketService, WebSocketsService classes, plus interfaces and collections
    • Last updated 22 June 2011

are these somehow different? Are some older versions?

I've always assumed the 'Microsoft.Web' namespace was used for pre-release code, but even the demos at the Build conference use this namespace, despite

Edit
Report

1 Answer

26

I will add little bit more to your confusion. Microsoft.* prefixed assemblies / namespaces are usually either very specific to some language or not part of .NET framework (shipped out of band (or prototypes)).

Assemblies / namespaces shipped with .NET framework usually start with System.*. There are two namespaces containing features related to WebSockets in .NET 4.5:

  • System.Net.WebSockets - implementation of WebSockets
  • System.Web.WebSockets - integration of WebSockets with ASP.NET

I haven't see System.ServiceModel.WebSockets but I think there was some prototype named Microsoft.ServiceModel.WebSockets

answered 2011-10-24T14:22:24.447

Your Answer