Ejemplo n.º 1
0
        public bool RoomLogin()
        {
            string publicIp = GetClientRemoteEndPoint().Address;

            try
            {
                if (roomCache.ContainsKey(publicIp))
                {
                    var r = roomCache[publicIp];
                    roomCache.Remove(publicIp);
                    roomCache[publicIp].Callback.RoomRelogin();
                    roomCache[publicIp].ServiceInstance.Dispose();
                }
            }
            catch { }
            OperationContext.Current.Channel.Faulted += RoomChannel_Faulted;
            OperationContext.Current.Channel.Closing += RoomChannel_Closing;
            rnc = new RoomNCallback
            {
                Callback        = OperationContext.Current.GetCallbackChannel <IChatServiceCallback>(),
                PublicIpAddress = publicIp,
                ServiceInstance = this
            };
            roomCache.Add(publicIp, rnc);
            return(true);
        }
Ejemplo n.º 2
0
 private void Dispose(bool disposing)
 {
     if (!disposed)
     {
         if (disposing)
         {
         }
         unc = null;
         rnc = null;
     }
 }
Ejemplo n.º 3
0
 private void LogOff(RoomNCallback roomNC)
 {
     roomCache.Remove(roomNC.PublicIpAddress);
     roomNC.ServiceInstance.Dispose();
 }
Ejemplo n.º 4
0
 public bool RoomLogin()
 {
     string publicIp = GetClientRemoteEndPoint().Address;
     try
     {
         if (roomCache.ContainsKey(publicIp))
         {
             var r = roomCache[publicIp];
             roomCache.Remove(publicIp);
             roomCache[publicIp].Callback.RoomRelogin();
             roomCache[publicIp].ServiceInstance.Dispose();
         }
     }
     catch { }
     OperationContext.Current.Channel.Faulted += RoomChannel_Faulted;
     OperationContext.Current.Channel.Closing += RoomChannel_Closing;
     rnc = new RoomNCallback
     {
         Callback = OperationContext.Current.GetCallbackChannel<IChatServiceCallback>(),
         PublicIpAddress = publicIp,
         ServiceInstance = this
     };
     roomCache.Add(publicIp, rnc);
     return true;
 }
Ejemplo n.º 5
0
		private void Dispose(bool disposing)
		{
			if (!disposed)
			{
				if (disposing)
				{
				}
                unc = null;
                rnc = null;
			}
		}
Ejemplo n.º 6
0
 private void LogOff(RoomNCallback roomNC)
 {
     roomCache.Remove(roomNC.PublicIpAddress);
     roomNC.ServiceInstance.Dispose();
 }