mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-23 12:49:35 -10:00
Adds to System.Net.WebSockets: - WebSocketException deriving from Win32Exception - WebSocketException.ctor() - WebSocket.DefaultKeepAliveInterval - WebSocket.CreateClientBuffer - WebSocket.CreateClientWebSocket - WebSocket.CreateServerBuffer - WebSocket.IsApplicationTargeting45 - WebSocket.IsStateTerminal - WebSocket.ReisterPrefixes - WebSocket.ThrowOnInvalidState - WebSocketContext.RequestUri - WebSocketContext.Headers - WebSocketContext.Origin - WebSocketContext.SecWebSocketProtocols - WebSocketContext.SecWebSocketKey - WebSocketContext.CookieCollection - WebsocketContext.User - WebSocketContext.IsAuthenticated - WebSocketContext.IsLocal - WebSocketContext.IsSecureConnection - WebSocketContext.WebSocket (Several of these members just throw PlatformNotSupportedException. Others have a different implementation than on desktop but something that's reasonable for corefx given the rest of the implementation's differences, e.g. limits on buffer sizes.) Adds to System.Net.WebSockets.Client: - ClientWebSocketOptions.UseDefaultCredentials - ClientWebSocketOptions.SetBuffer(int, int) - ClientWebSocketOptions.SetBuffer(int, int, ArraySegment<byte>) As part of this, I also: - Updated ClientWebSocketOptions.KeepAliveInterval to default to 30 seconds, as it does on desktop, rather than defaulting to 0. - Updated the managed websockets implementation to take the ClientWebSocketOptions buffer information into account, in particular the receive buffer size and the buffer itself (as long as offset and count don't represent a subset, which would have been a more intrusive change to support). Commit migrated from https://github.com/dotnet/corefx/commit/c97a2c7ac8ff5a4473348adf2ba6ca6a141de116