Esempio n. 1
0
        /// <summary>
        /// A callback which is called when the service channel closes/faults. It marks the client as not connected
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void InnerChannel_Faulted(object sender, EventArgs e)
        {
            IClientChannel channel = (IClientChannel)sender;

            // if the channel faults, notfiy cancealation
            if (channel.State == CommunicationState.Faulted)
            {
                concreteClient.NotifyGameCanceled();
            }
            else
            {
                concreteClient.NotifyConnectionClosed();
            }
            // in any case, mark as not running
            canConnect = false;
            Running    = false;
        }
Esempio n. 2
0
 /// <summary>
 /// Called by the client when the connection to the server is closed
 /// </summary>
 public virtual void NotifyConnectionClosed()
 {
     helper.NotifyConnectionClosed();
 }