/* ============================================================================== Send */ public virtual void Send(ClusterMessage message) { try { message.SenderInfo = m_clusterMemberInfo; Stream messageStream = m_formatter.Serialize(message); InternalSend(messageStream); } catch (Exception e) //logged { Logger.WriteException(e); OnSendException(message, e); } }
/* ============================================================================== Send */ public virtual void Send(ClusterMessage message) { try { message.SenderInfo = m_clusterMemberInfo; message.SenderInfo.ClusterMemberID = this.ReceiverName; Stream messageStream = m_formatter.Serialize(message); InternalSend(messageStream, message is DebugMessage); } catch (Exception e) //logged { Logger.WriteException(e); OnSendException(message, e); } }
/* ============================================================================== Send */ public virtual void Send(ClusterMessage message) { try { message.SenderInfo = m_clusterMemberInfo; message.SenderInfo.ClusterMemberID = this.ReceiverName; Stream messageStream = m_formatter.Serialize(message); SnTrace.Messaging.Write("Sending a '{0}' message", message.GetType().FullName); InternalSend(messageStream, message is DebugMessage); } catch (Exception e) // logged { SnLog.WriteException(e); SnTrace.Messaging.WriteError("Sending a '{0}' message. Exception: {1}", message.GetType().FullName, e); OnSendException(message, e); } }
/* ============================================================================== Send */ public virtual async Task SendAsync(ClusterMessage message, CancellationToken cancellationToken) { try { message.SenderInfo = m_clusterMemberInfo; message.SenderInfo.ClusterMemberID = ReceiverName; Stream messageStream = m_formatter.Serialize(message); SnTrace.Messaging.Write("Sending a '{0}' message", message.GetType().FullName); await InternalSendAsync(messageStream, message is DebugMessage, cancellationToken).ConfigureAwait(false); } catch (Exception e) // logged { SnLog.WriteException(e); SnTrace.Messaging.WriteError("Sending a '{0}' message. Exception: {1}", message.GetType().FullName, e); OnSendException(message, e); } }