public void RenegotiateWireFormat(WireFormatInfo info)
{
if(info.Version < minimumVersion)
{
throw new IOException("Remote wire format (" + info.Version + ") is lower than the minimum version required (" + minimumVersion + ")");
}
this.Version = Math.Min(PreferredWireFormatInfo.Version, info.Version);
this.cacheEnabled = info.CacheEnabled && PreferredWireFormatInfo.CacheEnabled;
this.stackTraceEnabled = info.StackTraceEnabled && PreferredWireFormatInfo.StackTraceEnabled;
this.tcpNoDelayEnabled = info.TcpNoDelayEnabled && PreferredWireFormatInfo.TcpNoDelayEnabled;
this.sizePrefixDisabled = info.SizePrefixDisabled && PreferredWireFormatInfo.SizePrefixDisabled;
this.tightEncodingEnabled = info.TightEncodingEnabled && PreferredWireFormatInfo.TightEncodingEnabled;
this.maxInactivityDuration = info.MaxInactivityDuration;
this.maxInactivityDurationInitialDelay = info.MaxInactivityDurationInitialDelay;
this.cacheSize = info.CacheSize;
TcpTransport tcpTransport = this.transport as TcpTransport;
if(null != tcpTransport)
{
tcpTransport.TcpNoDelayEnabled = this.tcpNoDelayEnabled;
}
}