Bug 58025 - HttpListenerContext does not implement WebSockets
Summary: HttpListenerContext does not implement WebSockets
Status: CONFIRMED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System (show other bugs)
Version: master
Hardware: PC Mac OS
: --- enhancement
Target Milestone: Future Release
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-07-07 23:53 UTC by Frank A. Krueger
Modified: 2018-03-12 08:36 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 58025 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Frank A. Krueger 2017-07-07 23:53:51 UTC
All of the WebSocket functions are marked as MonoTODO and throw NotImplemented.

For example,

    [MonoTODO]
    public Task<HttpListenerWebSocketContext> AcceptWebSocketAsync (string subProtocol)
    {
        throw new NotImplementedException ();
    }

Now that we have reference source for all of this:

https://referencesource.microsoft.com/#System.Web/HttpContext.cs,210

Would it be possible to get this added to Xamarin.iOS?
Comment 1 Sebastien Pouliot 2017-07-10 20:06:40 UTC
We already ship System.Net.WebSockets.* from corefx on all platforms, except watchOS (no sockets)

Your example seems to be on some HttpListenerContext methods which are marked as MonoTODO. I'm not sure why/when those will be added to mono (c.c. Marek) but XI will pick them up when they are available.


castor:mono poupou$ git grep WebSocket mcs/class/System/*.sources
mcs/class/System/System_test.dll.sources:System.Net.WebSockets/ClientWebSocketTest.cs
mcs/class/System/common.sources:../../../external/corefx/src/Common/src/System/Net/WebSockets/ManagedWebSocket.cs
mcs/class/System/common.sources:../../../external/corefx/src/Common/src/System/Net/WebSockets/WebSocketValidate.cs
mcs/class/System/common.sources:../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/WebSocket.cs
mcs/class/System/common.sources:../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketCloseStatus.cs
mcs/class/System/common.sources:../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketContext.cs
mcs/class/System/common.sources:../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketError.cs
mcs/class/System/common.sources:../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketException.cs
mcs/class/System/common.sources:../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketMessageType.cs
mcs/class/System/common.sources:../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketReceiveResult.cs
mcs/class/System/common.sources:../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketState.cs
mcs/class/System/common.sources:../../../external/corefx/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/ClientWebSocket.cs
mcs/class/System/common.sources:../../../external/corefx/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/ClientWebSocketOptions.cs
mcs/class/System/common.sources:../../../external/corefx/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/WebSocketHandle.Managed.cs
mcs/class/System/common.sources:../../../external/corefx/src/System.Net.HttpListener/src/System/Net/WebSockets/HttpListenerWebSocketContext.cs
mcs/class/System/monotouch_watch_System.dll.exclude.sources:System.Net.WebSockets/ClientWebSocket.cs
Comment 2 Frank A. Krueger 2017-07-11 01:08:07 UTC
Yeah it seems you have all the client code but not the server code. Afaik, you always go through HttpListener to host sockets.