-
Notifications
You must be signed in to change notification settings - Fork 154
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
Question: Communicate with other connections #109
Comments
Why not? |
You can store the ConnectionContext in a ConcurrentDictionary somewhere. Those have everything u need on them. I have done something similar in here: https://github.com/tomesendam/RelayServer.Benchmarking/blob/main/src/TheDesolatedTunnels.RelayServer.Core/Services/ConnectionStore.cs Which in turn is taken from: |
@tomesendam I implemented something similar, but now I am running into blocking issues. I'll look at the code you provided. I'm building something very similar to RelayServer (except starting from https://github.com/davidfowl/MultiProtocolAspNetCore) and I've been enormously frustrated by the lack of documentation on Microsoft stuff. Thank you. |
This isn't Microsoft stuff, it's my stuff. Also it's not really a mainline scenario that's why the documentation is light. I can help if you share specifics on where you are stuck |
How would I receive a message on a ConnectionHandler and then send a message to a different connection on the same listener? I can't raise an event from a ConnectionHandler because DI and referenced assemblies. I could put Server into a holding class and inject that, but Server doesn't expose enough underlying functionality. _listeners and _connections are both private. I could create a singleton DI class to inject into ConnectionHandlers, and have each request call into that to store it's info, but I wouldn't get close notifications. My requirement is conceptually similar to hub and spoke with groups in SignalR, and I'm trying to do this without modifying FW code. Is it possible with the current design?
The text was updated successfully, but these errors were encountered: