Example #1
0
        public User GetConnected(string username, string Remote_Address)
        {
            User user;
             connections.Add(Context.ConnectionId);
             var ot=new openTok (Remote_Address);
             user = new User(username,Context.ConnectionId, ot);

            Users.TryAdd(Context.ConnectionId, user);
            Clients.Clients(connections.AllExcept(Context.ConnectionId)).getNewOnlineUser(user);
            Clients.Client(Context.ConnectionId).getOnlineUsers(Users);

            return user;
        }
Example #2
0
        public void EndCall(string CallerConnectionId)
        {
            try
            {

                User caller = new User();
                User self = new User();
                if (Users.ContainsKey(Context.ConnectionId))
                {
                   self = Users[Context.ConnectionId];
                   caller = Users[CallerConnectionId];
                  Clients.Client(CallerConnectionId).notifyCallend(caller, self);

                }
            }
            catch (Exception exp)
            {   }
        }