Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client without Receiver, Server without Hub: Set specific handler funcs instead #73

Open
philippseith opened this issue Sep 19, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@philippseith
Copy link
Owner

philippseith commented Sep 19, 2021

Callback handlers in the client should not only be possible with public methods in a class given by the Receiver option, but also by passing single handler functions

action := func(paraminterface{}) { ... }

NewClient(..., ReceiveFunc(„ProductUpdate“, action), ...)

Originally posted by @philippseith in #65 (comment)

The server interface could be extended using the same pattern:

method := func(param ...interface{}) []interface{} { ... }

NewServer(..., Method("AddProduct", method) ...)

ReceiveFunc can be used also with the server.

@philippseith philippseith changed the title ReceiveFunc client option Client without Receiver, Server without Hub: Set specific handler funcs instead Oct 23, 2021
@philippseith philippseith added the enhancement New feature or request label Nov 6, 2021
umaYnit added a commit to umaYnit/signalr that referenced this issue Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant