From e38284cba94a8f20d38de8c991a506cc626c9ace Mon Sep 17 00:00:00 2001 From: Brennan Date: Mon, 23 Jan 2023 16:12:35 -0800 Subject: [PATCH] Java supports client results (#28147) --- aspnetcore/signalr/client-features.md | 2 +- aspnetcore/signalr/hubs.md | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/aspnetcore/signalr/client-features.md b/aspnetcore/signalr/client-features.md index 9041e6568c..1753c2045f 100644 --- a/aspnetcore/signalr/client-features.md +++ b/aspnetcore/signalr/client-features.md @@ -40,7 +40,7 @@ The table below shows the features and support for the clients that offer real-t | Long Polling Transport |2.1.0|1.0.0|1.0.0|3.0.0| | JSON Hub Protocol |2.1.0|1.0.0|1.0.0|1.0.0| | MessagePack Hub Protocol |2.1.0|1.0.0|1.0.0|5.0.0| -| Client Results |7.0.0|7.0.0|7.0.0|❌| +| Client Results |7.0.0|7.0.0|7.0.0|7.0.0| Support for enabling additional client features is tracked in [our issue tracker](https://github.com/dotnet/AspNetCore/issues). diff --git a/aspnetcore/signalr/hubs.md b/aspnetcore/signalr/hubs.md index e0423683a0..f6f56084f3 100644 --- a/aspnetcore/signalr/hubs.md +++ b/aspnetcore/signalr/hubs.md @@ -689,6 +689,14 @@ hubConnection.on("GetMessage", async () => { }); ``` +#### Java client + +```java +hubConnection.onWithResult("GetMessage", () -> { + return Single.just("message"); +}); +``` + ## Change the name of a hub method By default, a server hub method name is the name of the .NET method. To change this default behavior for a specific method, use the [HubMethodName](xref:Microsoft.AspNetCore.SignalR.HubMethodNameAttribute) attribute. The client should use this name instead of the .NET method name when invoking the method: