/// <summary> /// Creates a new instance of the <see cref="StreamParser"/> class /// </summary> /// <param name="session">A <see cref="TcpIpSession"/></param> /// <param name="responseQueue">A <see cref="ResponseQueue"/> instance to which <see cref="ResponsePDU"/> pdu's are forwarded</param> /// <param name="requestProcessor">A callback delegate for processing <see cref="RequestPDU"/> pdu's</param> public StreamParser(TcpIpSession session, ResponseHandler responseQueue,PduProcessorCallback requestProcessor) { if (session == null) { throw new ArgumentNullException("session"); } if (requestProcessor == null) { throw new ArgumentNullException("requestProcessor"); } if (responseQueue == null) { throw new ArgumentNullException("responseQueue"); } vTcpIpSession = session; vProcessorCallback = requestProcessor; vResponseHandler = responseQueue; //--Create and initialize a trace switch vTraceSwitch = new TraceSwitch("StreamParserSwitch", "Stream perser switch"); }
/// <summary> /// Creates a new instance of the <see cref="StreamParser"/> class /// </summary> /// <param name="session">A <see cref="TcpIpSession"/></param> /// <param name="responseQueue">A <see cref="ResponseQueue"/> instance to which <see cref="ResponsePDU"/> pdu's are forwarded</param> /// <param name="requestProcessor">A callback delegate for processing <see cref="RequestPDU"/> pdu's</param> public StreamParser(TcpIpSession session, ResponseHandler responseQueue, PduProcessorCallback requestProcessor) { if (session == null) { throw new ArgumentNullException("session"); } if (requestProcessor == null) { throw new ArgumentNullException("requestProcessor"); } if (responseQueue == null) { throw new ArgumentNullException("responseQueue"); } vTcpIpSession = session; vProcessorCallback = requestProcessor; vResponseHandler = responseQueue; //--Create and initialize a trace switch vTraceSwitch = new TraceSwitch("StreamParserSwitch", "Stream perser switch"); }