データを送信する必要があるさまざまなユーザー グループがあります。ここでハブの概念を使用することもできましたが、唯一の SignalR Android クライアント ライブラリ "SignalA" https://github.com/erizet/SignalA にはハブの実装がないため、Persisted Connections とそのグループの概念を使用する必要がありました。今、SignalR ドキュメント サイトでこの OnConnected メソッドを参照してください。
protected override Task OnConnected(IRequest request, string connectionId)
{
return Groups.Add(connectionId, "foo");
}
ユーザーがさまざまなグループに参加できるようにしたいので、接続すると、追加したいグループ名が渡されます。ハードコーディングされた「foo」を使用する代わりに、クライアント側でグループ名を渡し、上記の方法でそれを受け取るにはどうすればよいですか?
また、ハブが実装されている SignalR Java クライアント ライブラリを見つけられなかったので、だれかが教えてくれたらとてもうれしいです。
ありがとう