'How can I transfer data from the project to the Worker service via SignalR?

I would like to contact SignalR.

On the front side when the user adds a new mp3. In addition to writing this to the database, I also need to transfer that mp3 to the client side. But my client side is Worker Service. I need to transfer this mp3 to that Worker Service via SignalR. How can I do this?

How do I call a hub inside a project, run the method, and pass it to the Worker service? And at the same time how do I receive it on the Service side?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source