public LogData ProcessLog()
        {
            string logFilename = SessionInfo.LocalLogFile;

            Console.WriteLine("Reading log file {0}", logFilename);

            LogData logData = new LogData(SessionInfo);

            if (!logFilename.EndsWith(".log"))
            {
                using (FileLogBinaryDataStream logDataStream = new FileLogBinaryDataStream(logFilename))
                {
                    BinaryLogParser logParser = new BinaryLogParser(logDataStream, logData, logFilename);
                    logParser.ProcessDataStream();
                }
            }
            else
            {
                using (FileLogDataStream logDataStream = new FileLogDataStream(logFilename))
                {
                    LogParser logParser = new LogParser(logDataStream, logData);
                    logParser.ProcessDataStream();
                }
            }

            logData.ProcessRecords();

            return(logData);
        }
        static void ProcessSocketDataStreamCB(object state)
        {
            SSocketParseArgs args      = (SSocketParseArgs)state;
            NetworkStream    netStream = args.m_client.GetStream();

            if (args.m_logData.m_logWriteFilename == "")
            {
                args.m_logData.m_logWriteFilename = Path.GetTempFileName();
                args.m_logData.m_bTempFile        = true;
            }

            using (SocketLogBinaryDataStream logDataStream = new SocketLogBinaryDataStream(netStream, args.m_logData.m_logWriteFilename))
            {
                try
                {
                    args.m_logData.DataStream = logDataStream;
                    BinaryLogParser logParser = new BinaryLogParser(logDataStream, args.m_logData, "");
                    logParser.ProcessDataStream();
                }
                catch (Exception)
                {
                }
            }

            netStream.Close();
            args.m_client.Close();
        }