Cgw.Common.VideoPipe.VideoPipe C# (CSharp) Method

VideoPipe() public method

构造函数,实例化命名管道
public VideoPipe ( string pipeName ) : System
pipeName string
return System
        public VideoPipe(string pipeName)
        {
            mediaDataSize = 0;
            this.pipeName = pipeName;
            this.pipedStream = new NamedPipeClientStream(".", pipeName, PipeDirection.InOut, PipeOptions.Asynchronous);

            //初始化定时器
            this.namedPipeHasVideoDataTimer.AutoReset = true;
            this.namedPipeHasVideoDataTimer.Elapsed += new ElapsedEventHandler(namePipeDataCheck_Elapsed);
            //管道监控时间间隔,1秒
            this.namedPipeHasVideoDataTimer.Interval = CgwConst.Thread_Sleep_Time;
            this.namedPipeHasVideoDataTimer.Start();
        }