Ejemplo n.º 1
0
        /// <summary>
        /// 메시지가 정확한지 판단.
        /// </summary>
        public override BinaryRequestInfo Filter(byte[] readBuffer, int offset, int length, bool toBeCopied, out int rest)
        {
            rest = 0;

            //데이터가 있는지?
            if (null == readBuffer)
            {
                return(NullRequestInfo);
            }

            //데이터가 있다.

            //리턴할 객체
            BinaryRequestInfo briReturn;
            //원본 데이터
            DataOriginal insData = new DataOriginal();

            insData.Length = length;

            //데이터를 오프셋을 기준으로 자른다.
            Buffer.BlockCopy(readBuffer, offset, insData.Data, 0, length);

            //데이터를 넣는다.
            briReturn = new BinaryRequestInfo("", insData.Data);

            return(briReturn);
        }
Ejemplo n.º 2
0
        private DataOriginal CreateDataOriginal_Byte()
        {
            //Send your return to the original data for
            DataOriginal dataReturn = new DataOriginal();

            //Secure data space
            dataReturn.Data = new byte[Global.g_CommandSize + this.Data_Byte.Length];
            //Coppy Data
            Buffer.BlockCopy(Data_Byte, 0, dataReturn.Data, 0, Data_Byte.Length);

            return(dataReturn);
        }
Ejemplo n.º 3
0
        public DataSend(DataOriginal dataOri)
        {
            ResetClass();

            this.DataOriginalToThis(dataOri);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// It makes the original data in this class.
 /// </summary>
 /// <param name="dataOri"></param>
 public void DataOriginalToThis(DataOriginal dataOri)
 {
     DataOriginalToThis(dataOri.Data);
 }