Skip to content

Commit 0671c4b

Browse files
committed
up
1 parent 6bd0a4f commit 0671c4b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

kbe/src/lib/cstdkbe/memorystream.hpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,16 @@ class MemoryStreamException
6262
};
6363

6464
/*
65-
byte流:
66-
能够将一些常用的数据类型以byte数据存储在一个vector中, 该对于一些占位比较大的数据类型
67-
再最后一个位置存放一个0标示结束, 这种存储结构适合网络间打包传输一些数据。
68-
69-
注意:网络间传输可能涉及到一些字节序的问题, 需要进行转换。
70-
具体看 MemoryStreamConverter.hpp
65+
将常用数据类型二进制序列化与反序列化
66+
注意:端与端之间传输可能涉及大小端问题,可以通过如下进行转换进行转换:
67+
具体看 MemoryStreamConverter.hpp
7168
7269
使用方法:
7370
MemoryStream stream;
7471
stream << (int64)100000000;
7572
stream << (uint8)1;
7673
stream << (uint8)32;
77-
stream << "kebiao";
74+
stream << "kbe";
7875
stream.print_storage();
7976
uint8 n, n1;
8077
int64 x;

0 commit comments

Comments
 (0)