Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serializer要加<< vector #59

Open
hevake opened this issue Oct 27, 2023 · 1 comment
Open

Serializer要加<< vector #59

hevake opened this issue Oct 27, 2023 · 1 comment
Assignees

Comments

@hevake
Copy link
Member

hevake commented Oct 27, 2023

No description provided.

@hevake hevake self-assigned this Oct 27, 2023
@wangwenqiangGitHub
Copy link

看了这个类,有一个场景想问一下,比如class bufferA{
Public:
uint16 tag;
unit8 Len;
uint8 data[1024];
}

其中data会根据len 的长度而变化,len是一包数据的长度,其实data 的数据都是有含义的,直接定义data 数组很不形象表达,代码在解析时很多位操作,我想在接收到数据的时候,直接采用memcopy ,这样效率高,对于定长的数据还可以,变长的有什么简单方法么,如何将您写的Serialize和deSerilalize应用呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants