コード例 #1
0
 static public int closeWrite(IntPtr l)
 {
     try {
         Game.ActionRecord self = (Game.ActionRecord)checkSelf(l);
         self.closeWrite();
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #2
0
        public void WriteProc()
        {
            arWrite.openAppend();

            while (true)
            {
                if (!WriteActions())
                {
                    break;
                }

                if (exitEvent.WaitOne(waitTime))
                {
                    arWrite.writeFinishFlag();
                    arWrite.closeWrite();
                    break;
                }
            }
        }
コード例 #3
0
        public static void startRecord(string clientVer, string fileName, long timestamp, string roomInfo)
        {
            if (arWrite != null)
            {
                return;
            }

            bool fileExist = false;

            arWrite = new ActionRecord(fileName);
            arWrite.openWrite(out fileExist);
            if (!fileExist)
            {
                arWrite.writeHead(clientVer, timestamp, roomInfo);
            }
            arWrite.closeWrite();

            arWrite.writeThread = new Thread(arWrite.WriteProc);
            arWrite.exitEvent   = new AutoResetEvent(false);

            arWrite.actions.Clear();
            arWrite.writeThread.Start();
        }