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); }
private void Dispose(bool disposing) { if (!disposed) { if (disposing) { } unc = null; rnc = null; } }
private void LogOff(RoomNCallback roomNC) { roomCache.Remove(roomNC.PublicIpAddress); roomNC.ServiceInstance.Dispose(); }
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; }