Last post Aug 16, 2017 06:26 AM by atlanti
Aug 14, 2017 11:25 AM|atlanti|LINK
Let's suppose I have client and server sides of hubs and I make connection to communicate with each other. Client side always listen to server(you can asuume that, send and receive messages between them) I am also able to create new another hub except
mainhub. We create second hub because we dont want mainhub gets busy, we use second hub for send big stack of data from client to server or opposite. When second hub finish its transaction, we stop to secondhub run. The issue is when I stop it, client connection
get lost in mainhub then client reconnect to mainhub by itself. I want client always keep connect to mainhub even I stop to secondhub`s run.
Aug 15, 2017 08:16 AM|Eric Du|LINK
According to your description, as far as I know, about how to keep connect multiple hubs and disconnect form one. You could refer to the following tutorials:
How to handle connection lifetime events in the Hub class:
Connected to multiple hubs and disconnect from only one:
Aug 16, 2017 06:26 AM|atlanti|LINK
I could not find a similar code example in my algorithm construction, although I have examined all the examples in there. If you look at the fact I can not fully explain the problem. I am opening the first hub connection in a single server windows form application,
then I open the second hub connection. I want to turn it off when the second hub connection is done. But the first hub is reconnecting. I do not do anything with the first hub.
I also created a question title here : https://stackoverflow.com/questions/45673968/c-sharp-signalr-multiple-hub-single-hub-dispose
Thank you for your interest,