Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ protected WebSocket() { }
public abstract System.Threading.Tasks.Task<System.Net.WebSockets.WebSocketReceiveResult> ReceiveAsync(System.ArraySegment<byte> buffer, System.Threading.CancellationToken cancellationToken);
public virtual System.Threading.Tasks.ValueTask<System.Net.WebSockets.ValueWebSocketReceiveResult> ReceiveAsync(System.Memory<byte> buffer, System.Threading.CancellationToken cancellationToken) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.ObsoleteAttribute("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.")]
public static void RegisterPrefixes() { }
public abstract System.Threading.Tasks.Task SendAsync(System.ArraySegment<byte> buffer, System.Net.WebSockets.WebSocketMessageType messageType, bool endOfMessage, System.Threading.CancellationToken cancellationToken);
public virtual System.Threading.Tasks.ValueTask SendAsync(System.ReadOnlyMemory<byte> buffer, System.Net.WebSockets.WebSocketMessageType messageType, bool endOfMessage, System.Threading.CancellationToken cancellationToken) { throw null; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ public static WebSocket CreateFromStream(Stream stream, WebSocketCreationOptions
public static bool IsApplicationTargeting45() => true;

[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.")]
public static void RegisterPrefixes()
{
// The current WebRequest implementation in the libraries does not support upgrading
Expand Down
2 changes: 2 additions & 0 deletions src/libraries/System.Net.WebSockets/tests/WebSocketTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ public static void CreateClientWebSocket_InvalidArguments_Throws()
[Fact]
public static void RegisterPrefixes_Unsupported()
{
#pragma warning disable 0618 // Obsolete API
Assert.Throws<PlatformNotSupportedException>(() => WebSocket.RegisterPrefixes());
#pragma warning restore 0618
}

[Fact]
Expand Down