// Token: 0x060017C0 RID: 6080 RVA: 0x0006212A File Offset: 0x0006032A internal void SetEncoding(CompressionConfig cfg) { if (cfg.Provider == CompressionConfig.CompressionProvider.Coconet) { this.Encoding = NetworkChannel.DataEncodingScheme.Coconet; } else if (cfg.Provider == CompressionConfig.CompressionProvider.Xpress) { this.Encoding = NetworkChannel.DataEncodingScheme.CompressedXpress; } else { this.Encoding = NetworkChannel.DataEncodingScheme.Uncompressed; } this.CompressionConfig = cfg; }
public void Execute() { Exception ex; CompressionConfig encoding = CompressionConfig.Deserialize(this.ConfigXml, out ex); string configXml; if (ex != null) { ReplayCrimsonEvents.InvalidCompressionConfigReceived.LogPeriodic <string, string, Exception>(base.Channel.PartnerNodeName, DiagCore.DefaultEventSuppressionInterval, base.Channel.PartnerNodeName, this.ConfigXml, ex); CompressionConfig obj = new CompressionConfig(); configXml = SerializationUtil.ObjectToXml(obj); } else { configXml = this.ConfigXml; } NetworkChannelCompressionConfigMsg networkChannelCompressionConfigMsg = new NetworkChannelCompressionConfigMsg(base.Channel, NetworkChannelCompressionConfigMsg.MessagePurpose.DeclareEncoding, configXml); networkChannelCompressionConfigMsg.Send(); base.Channel.SetEncoding(encoding); base.Channel.KeepAlive = true; }