signalr-client icon indicating copy to clipboard operation
signalr-client copied to clipboard

Example Project?

Open NullVoxPopuli opened this issue 6 years ago • 3 comments

Just wondering how to use each of the APIs (with backing C# code), in particular, stream on the connection atm. :)

Thanks :)

NullVoxPopuli avatar Feb 25 '19 19:02 NullVoxPopuli

Using the client is quite straight forward and the best place to see samples is either at docs here doc sample and in one of our playgrounds https://github.com/sketch7/orleans-heroes/blob/master/heroes.client.ngx-app/src/app/areas/signalr/signalr.component.ts#L60

RE: stream the client side works pretty well, however, the usage we have on the server is not working since they had changed it at a point and we never updated it.

We use this in production as well, however we use on api instead of stream

NOTE: The playground was very outdated, but yesterday we gave it some updates; however its far from complete.

stephenlautier avatar Feb 25 '19 22:02 stephenlautier

I was mostly trying to figure out how to use hub groups, and was thinking that stream may be one of those options (it was not).

turns out, groups aren't anything at all, and require manual adding/removing -- so I'm doing this with additional send messages from ss7/signalr-client at the moment. (I'm new to SignalR)

I think some example projects of different minimalist usage scenarios could go a long way though :)

NullVoxPopuli avatar Feb 25 '19 22:02 NullVoxPopuli

Yes, you are right, streams are not intended for that purpose.

In our playground we have a usage which is using groups.

  1. Register Client with group CLIENT
  2. Handle on server adding of group SERVER
  3. Sending message to group SERVER
  4. Subscribe On Group CLIENT

However it might not be the most simplistic signalr sample since we are using it with orleans (serverside)

stephenlautier avatar Feb 25 '19 22:02 stephenlautier