// Token: 0x06000B95 RID: 2965 RVA: 0x00033860 File Offset: 0x00031A60 private void GetChannel() { if (this.m_channel == null) { NetworkPath netPath = NetworkManager.ChooseNetworkPath(this.m_serverName, null, NetworkPath.ConnectionPurpose.Seeding); this.m_channel = NetworkChannel.Connect(netPath, TcpChannel.GetDefaultTimeoutInMs(), false); } }
// Token: 0x0600188B RID: 6283 RVA: 0x00064D84 File Offset: 0x00062F84 public Config() { this.LocalNodeName = Environment.MachineName; this.ReceiveBufferSize = RegistryParameters.LogCopyNetworkTransferSize; this.SendBufferSize = RegistryParameters.LogCopyNetworkTransferSize; this.IOTimeoutInMSec = TcpChannel.GetDefaultTimeoutInMs(); this.IdleLimit = TimeSpan.FromSeconds((double)RegistryParameters.TcpChannelIdleLimitInSec); }
// Token: 0x060019CD RID: 6605 RVA: 0x0006C134 File Offset: 0x0006A334 private void GetChannel() { lock (this) { if (this.isAborted) { throw new SeederOperationAbortedException(); } if (this.channel == null) { NetworkPath networkPath = NetworkManager.ChooseNetworkPath(this.sourceServerFqdn, this.NetworkName, NetworkPath.ConnectionPurpose.Seeding); if (this.CompressOverride != null || this.EncryptOverride != null || !string.IsNullOrEmpty(this.NetworkName)) { networkPath.Compress = (this.CompressOverride ?? networkPath.Compress); networkPath.Encrypt = (this.EncryptOverride ?? networkPath.Encrypt); networkPath.NetworkChoiceIsMandatory = true; } this.channel = NetworkChannel.Connect(networkPath, TcpChannel.GetDefaultTimeoutInMs(), false); } } }
internal static bool TestHealth(string targetServer, int targetPort, int timeOutInMs, out string errMsg) { errMsg = null; NetworkChannel networkChannel = null; Exception ex = null; ExTraceGlobals.TcpChannelTracer.TraceFunction <string>(0L, "TcpHealthCheck: testing {0}", targetServer); try { ushort num = (ushort)targetPort; if (num == 0) { num = 64327; } ITcpConnector tcpConnector = Dependencies.TcpConnector; NetworkPath netPath = tcpConnector.BuildDnsNetworkPath(targetServer, (int)num); networkChannel = NetworkChannel.Connect(netPath, TcpChannel.GetDefaultTimeoutInMs(), false); TestHealthRequest testHealthRequest = new TestHealthRequest(networkChannel); testHealthRequest.Send(); NetworkChannelMessage message = networkChannel.GetMessage(); if (!(message is TestHealthReply)) { networkChannel.ThrowUnexpectedMessage(message); } ExTraceGlobals.TcpChannelTracer.TraceFunction <string>(0L, "TcpHealthCheck: {0} is healthy", targetServer); return(true); } catch (NetworkRemoteException ex2) { ex = ex2.InnerException; } catch (NetworkTransportException ex3) { ex = ex3; } catch (Win32Exception ex4) { ex = ex4; } catch (COMException ex5) { ex = ex5; } catch (ClusCommonFailException ex6) { ex = ex6; } catch (ClusCommonTransientException ex7) { ex = ex7; } finally { if (networkChannel != null) { networkChannel.Close(); } } if (ex != null) { ExTraceGlobals.TcpChannelTracer.TraceError <Exception>(0L, "TcpHealthCheck: failed: {0}", ex); errMsg = ex.Message; } return(false); }