How can i get connected user id when using signleR
<p>I'm trying to get the connected user id in my signleR application but I didn't manage to find it. Is there any way to get it because I want when two users are chatting just the two of them will receive each other's messages and not the whole group they are connected to, or all clients connected to signleR hub. My main goal is to send private messages between two connected clients.</p>

<p>My code is so complicated but all I have found is how to broadcast my message to all the clients or to a specific group, but I couldn't manage to send a private message. I did this to send user typing message: </p>

<pre><code>public void UserTyping(string msg, int ToClient) { // display User is Typing Msg
  Clients.Others.OtherUserIsTyping(msg, ToClient);
}
</code></pre>

<p>ClientSide: </p>

<pre><code>var keyPressCount = 0;

$("#&lt;%=MsgToSend.ClientID %&gt;").keypress(function () {

  // Throttle the server call with some logic
  // Don't want to call the server on every keypress

  var ToClientID = $("#ToClientID").val();
  if (keyPressCount++ % 10 == 0) {
    chat.server.userTyping("Is typing...", ToClientID); // call the server side function
  }
});

chat.client.OtherUserIsTyping = function (msg, ToClient) { // declare the function on the chat hub so the server can invoke it
  $("#UserTyping").html(msg);
}
</code></pre>
