本文整理汇总了C#中SiloAddress.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# SiloAddress.ToString方法的具体用法?C# SiloAddress.ToString怎么用?C# SiloAddress.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SiloAddress
的用法示例。
在下文中一共展示了SiloAddress.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnPingReplyMissed
internal static void OnPingReplyMissed(SiloAddress replier)
{
FindCounter(perSiloPingReplyMissedCounters, new StatisticName(StatisticNames.MESSAGING_PINGS_REPLYMISSED_PER_SILO, replier.ToString()), CounterStorage.LogOnly).Increment();
}
示例2: OnMessageSend_Impl
private static void OnMessageSend_Impl(SiloAddress targetSilo, Message.Directions direction, int numTotalBytes, int headerBytes, int numMsgsInBatch)
{
MessagesSentTotal.IncrementBy(numMsgsInBatch);
MessagesSentPerDirection[(int)direction].IncrementBy(numMsgsInBatch);
TotalBytesSent.IncrementBy(numTotalBytes);
HeaderBytesSent.IncrementBy(headerBytes);
sentMsgSizeHistogram.AddData(numTotalBytes);
FindCounter(perSiloSendCounters, new StatisticName(StatisticNames.MESSAGING_SENT_MESSAGES_PER_SILO, (targetSilo != null ? targetSilo.ToString() : "Null")), CounterStorage.LogOnly).IncrementBy(numMsgsInBatch);
}
示例3: OnPingReceive
internal static void OnPingReceive(SiloAddress destination)
{
FindCounter(perSiloPingReceiveCounters, new StatisticName(StatisticNames.MESSAGING_PINGS_RECEIVED_PER_SILO, destination.ToString()), CounterStorage.LogOnly).Increment();
}
示例4: GetSendingSocket
protected override bool GetSendingSocket(Message msg, out Socket socket, out SiloAddress targetSilo, out string error)
{
socket = null;
targetSilo = msg.TargetSilo;
error = null;
try
{
socket = messageCenter.SocketManager.GetSendingSocket(targetSilo.Endpoint);
if (socket.Connected) return true;
messageCenter.SocketManager.InvalidateEntry(targetSilo.Endpoint);
socket = messageCenter.SocketManager.GetSendingSocket(targetSilo.Endpoint);
return true;
}
catch (Exception ex)
{
error = "Exception getting a sending socket to endpoint " + targetSilo.ToString();
Log.Warn(ErrorCode.Messaging_UnableToGetSendingSocket, error, ex);
messageCenter.SocketManager.InvalidateEntry(targetSilo.Endpoint);
lastConnectionFailure[targetSilo] = DateTime.UtcNow;
return false;
}
}