示例#1
0
        private void _Package(byte[] bytes)
        {
            var pkg = (TPackage)_Serializer.Deserialize(bytes);

            _DoneEvent.Invoke(pkg);

            if (_Stop == false)
            {
                _ReadHead();
            }
        }
示例#2
0
        private void _Package(byte[] bytes)
        {
            TPackage pkg = (TPackage)_Serializer.Deserialize(bytes);

            if (pkg == null)
            {
                ErrorEvent();
                return;
            }
            _DoneEvent.Invoke(pkg);

            if (_Stop == false)
            {
                _ReadHead();
            }
        }