runtime: 2 members on WebSocket throw PNSE

These are both part of NS2.0. Both show no usage in our data. Please triage to 2.0, future, or close.

        public static void RegisterPrefixes()
        {
            // The current WebRequest implementation in corefx does not support upgrading
            // web socket connections.  For now, we throw.
            throw new PlatformNotSupportedException();
        }

        [EditorBrowsable(EditorBrowsableState.Never)]
        public static WebSocket CreateClientWebSocket(Stream innerStream,
            string subProtocol, int receiveBufferSize, int sendBufferSize,
            TimeSpan keepAliveInterval, bool useZeroMaskingKey, ArraySegment<byte> internalBuffer)
        {
            // ClientWebSocket on Unix is implemented in managed code and can be constructed (internally)
            // for an arbitrary stream. We could use that implementation here, building it in to the WebSocket
            // library as well, or accessing it from the client library via reflection.  For now, we throw.
            throw new PlatformNotSupportedException();
        }

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 23 (23 by maintainers)

Most upvoted comments

We do not remove members from types in net standard unless forced to to break dependencies (eg., on CAS or remoting types we don’t want). For example Appdomain has Createdomain on it. So if the members cannot be implemented, PNSE is the way to go. We’re trying to be pretty strict about not deferring PNSE without good reason, but of course that has to be weighed against value, usefulness, and other work you guys have. As I mentioned at the top, thes don’t show up in our usage graphs.

I vote for system.net, as websocket protocol is just another application layer protocol for bidirectional communication between client and server. The RFC states that the design of the protocol does not limit websocket to http. I’m less inclined to choose Sockets area, as socket is just an ipaddress and port at layer 4 or so in OSI, whereas websocket is a protocol above that layer.