Пример #1
0
 /// <summary>
 /// Передает всем клиентам информацию о сессии.
 /// </summary>
 public void ShareServerSessionForConnections(SessionStateMessage msg)
 {
     foreach (var userConnection in Connections)
     {
         userConnection.Connection.Send <SessionStateMessage>(msg);
     }
 }
Пример #2
0
        /// <summary>
        /// Обновляет информацию о сессии у пользователя.
        /// </summary>
        private void ShareServerSession(NetworkConnection clientConnection, SessionStateMessage msg)
        {
            if (Session == null)
            {
                return;
            }

            clientConnection.Send <SessionStateMessage>(Session.StateMessage);
        }