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
: --- normal
Target Milestone: Future Release
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2017-07-07 23:53 UTC by Frank A. Krueger
Modified: 2017-09-11 10:37 UTC (History)
5 users (show)

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


Attachments

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.

Note You need to log in before you can comment on or make changes to this bug.