SignalR recieve stop message on server from client. [closed]












0















On my client I want to send a message to the server letting the server know the client is no longer listening. I would like to call something like
signalRConnection.Stop(uniqueConnectionIdentifier)
Where uniqueConnectionIdentifier is a something unique to that signalRConnection. Is there a way to send this message back to the server when stopping the signalRConnection from the server?










share|improve this question













closed as too broad by Vadim Gremyachev, Dmitry, Nic3500, thewaywewere, Sterling Archer Mar 24 at 20:10


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.























    0















    On my client I want to send a message to the server letting the server know the client is no longer listening. I would like to call something like
    signalRConnection.Stop(uniqueConnectionIdentifier)
    Where uniqueConnectionIdentifier is a something unique to that signalRConnection. Is there a way to send this message back to the server when stopping the signalRConnection from the server?










    share|improve this question













    closed as too broad by Vadim Gremyachev, Dmitry, Nic3500, thewaywewere, Sterling Archer Mar 24 at 20:10


    Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.





















      0












      0








      0








      On my client I want to send a message to the server letting the server know the client is no longer listening. I would like to call something like
      signalRConnection.Stop(uniqueConnectionIdentifier)
      Where uniqueConnectionIdentifier is a something unique to that signalRConnection. Is there a way to send this message back to the server when stopping the signalRConnection from the server?










      share|improve this question














      On my client I want to send a message to the server letting the server know the client is no longer listening. I would like to call something like
      signalRConnection.Stop(uniqueConnectionIdentifier)
      Where uniqueConnectionIdentifier is a something unique to that signalRConnection. Is there a way to send this message back to the server when stopping the signalRConnection from the server?







      c# asp.net signalr signalr-hub signalr.client






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 3 at 13:45









      JayBateJayBate

      123




      123




      closed as too broad by Vadim Gremyachev, Dmitry, Nic3500, thewaywewere, Sterling Archer Mar 24 at 20:10


      Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









      closed as too broad by Vadim Gremyachev, Dmitry, Nic3500, thewaywewere, Sterling Archer Mar 24 at 20:10


      Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


























          1 Answer
          1






          active

          oldest

          votes


















          0














          You can send specific data (like string, int ) which is not from your regular signals.



          The client can use this data to initiate disconnect from the server.



          For ex. in below example, "kickedout" string is sent by server whenever server wants to kickout a client.



          void OnReceive(string data)
          {
          if(data.Equals("kickedout"))
          {
          connection.Stop();
          return;
          }

          Console.WriteLine(data);
          }





          share|improve this answer
























          • I need the client to initiate the process with a message. Think of a phone closing an application and i need to decrease a counter of the amount of clients for a particular area of that application. Area A of the app has 3, area B has 5. When a phone was subscribed to area A and sends the disconnect signal with an are A identifier i need it to decrease the area A counter.

            – JayBate
            Jan 3 at 14:21


















          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          You can send specific data (like string, int ) which is not from your regular signals.



          The client can use this data to initiate disconnect from the server.



          For ex. in below example, "kickedout" string is sent by server whenever server wants to kickout a client.



          void OnReceive(string data)
          {
          if(data.Equals("kickedout"))
          {
          connection.Stop();
          return;
          }

          Console.WriteLine(data);
          }





          share|improve this answer
























          • I need the client to initiate the process with a message. Think of a phone closing an application and i need to decrease a counter of the amount of clients for a particular area of that application. Area A of the app has 3, area B has 5. When a phone was subscribed to area A and sends the disconnect signal with an are A identifier i need it to decrease the area A counter.

            – JayBate
            Jan 3 at 14:21
















          0














          You can send specific data (like string, int ) which is not from your regular signals.



          The client can use this data to initiate disconnect from the server.



          For ex. in below example, "kickedout" string is sent by server whenever server wants to kickout a client.



          void OnReceive(string data)
          {
          if(data.Equals("kickedout"))
          {
          connection.Stop();
          return;
          }

          Console.WriteLine(data);
          }





          share|improve this answer
























          • I need the client to initiate the process with a message. Think of a phone closing an application and i need to decrease a counter of the amount of clients for a particular area of that application. Area A of the app has 3, area B has 5. When a phone was subscribed to area A and sends the disconnect signal with an are A identifier i need it to decrease the area A counter.

            – JayBate
            Jan 3 at 14:21














          0












          0








          0







          You can send specific data (like string, int ) which is not from your regular signals.



          The client can use this data to initiate disconnect from the server.



          For ex. in below example, "kickedout" string is sent by server whenever server wants to kickout a client.



          void OnReceive(string data)
          {
          if(data.Equals("kickedout"))
          {
          connection.Stop();
          return;
          }

          Console.WriteLine(data);
          }





          share|improve this answer













          You can send specific data (like string, int ) which is not from your regular signals.



          The client can use this data to initiate disconnect from the server.



          For ex. in below example, "kickedout" string is sent by server whenever server wants to kickout a client.



          void OnReceive(string data)
          {
          if(data.Equals("kickedout"))
          {
          connection.Stop();
          return;
          }

          Console.WriteLine(data);
          }






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 3 at 13:53









          Manoj ChoudhariManoj Choudhari

          2,3741721




          2,3741721













          • I need the client to initiate the process with a message. Think of a phone closing an application and i need to decrease a counter of the amount of clients for a particular area of that application. Area A of the app has 3, area B has 5. When a phone was subscribed to area A and sends the disconnect signal with an are A identifier i need it to decrease the area A counter.

            – JayBate
            Jan 3 at 14:21



















          • I need the client to initiate the process with a message. Think of a phone closing an application and i need to decrease a counter of the amount of clients for a particular area of that application. Area A of the app has 3, area B has 5. When a phone was subscribed to area A and sends the disconnect signal with an are A identifier i need it to decrease the area A counter.

            – JayBate
            Jan 3 at 14:21

















          I need the client to initiate the process with a message. Think of a phone closing an application and i need to decrease a counter of the amount of clients for a particular area of that application. Area A of the app has 3, area B has 5. When a phone was subscribed to area A and sends the disconnect signal with an are A identifier i need it to decrease the area A counter.

          – JayBate
          Jan 3 at 14:21





          I need the client to initiate the process with a message. Think of a phone closing an application and i need to decrease a counter of the amount of clients for a particular area of that application. Area A of the app has 3, area B has 5. When a phone was subscribed to area A and sends the disconnect signal with an are A identifier i need it to decrease the area A counter.

          – JayBate
          Jan 3 at 14:21





          Popular posts from this blog

          Monofisismo

          Angular Downloading a file using contenturl with Basic Authentication

          Olmecas