public MessageEventArgs(PacketParser.ApplicationLayerProtocol protocol, NetworkHost sourceHost, NetworkHost destinationHost, long startFrameNumber, DateTime startTimestamp, string from, string to, string subject, string message, Encoding messageEncoding, System.Collections.Specialized.NameValueCollection attributes) { this.Protocol = protocol; this.SourceHost = sourceHost; this.DestinationHost = destinationHost; this.StartFrameNumber = startFrameNumber; this.StartTimestamp = startTimestamp; this.From = from; this.To = to; this.Subject = subject; if (this.Subject != null && this.Subject.Length > MAX_SUBJECT_LENGTH) { this.Subject = this.Subject.Substring(0, MAX_SUBJECT_LENGTH) + "..."; } this.Message = message; if (messageEncoding == null) { this.MessageEncoding = Encoding.Default; } else { this.MessageEncoding = messageEncoding; } this.Attributes = attributes; }
public SessionEventArgs(PacketParser.ApplicationLayerProtocol protocol, NetworkHost client, NetworkHost server, ushort clientPort, ushort serverPort, bool tcp, int startFrameNumber, DateTime startTimestamp) { this.Protocol = protocol; this.Client = client; this.Server = server; this.ClientPort = clientPort; this.ServerPort = serverPort; this.Tcp = tcp; this.StartFrameNumber = startFrameNumber; this.StartTimestamp = startTimestamp; }
public SessionEventArgs(NetworkFlow flow, PacketParser.ApplicationLayerProtocol protocol, long startFrameNumber) { this.Protocol = protocol; this.Client = flow.FiveTuple.ClientHost; this.Server = flow.FiveTuple.ServerHost; this.ClientPort = flow.FiveTuple.ClientPort; this.ServerPort = flow.FiveTuple.ServerPort; this.Tcp = flow.FiveTuple.Transport == FiveTuple.TransportProtocol.TCP; this.StartFrameNumber = startFrameNumber; this.StartTimestamp = flow.StartTime; this.flow = flow; }
} //fore serialization purposes public MessageEventArgs(PacketParser.ApplicationLayerProtocol protocol, NetworkHost sourceHost, NetworkHost destinationHost, long startFrameNumber, DateTime startTimestamp, string from, string to, string subject, string message, System.Collections.Specialized.NameValueCollection attributes) : this(protocol, sourceHost, destinationHost, startFrameNumber, startTimestamp, from, to, subject, message, Encoding.Default, attributes) { }