-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmc_server_proto_stream.cpp
More file actions
51 lines (36 loc) · 1.14 KB
/
mc_server_proto_stream.cpp
File metadata and controls
51 lines (36 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include "mc_server_proto_stream.h"
namespace com {
namespace osada {
McServerProtoInputStream::McServerProtoInputStream() : reserveSize(DEFAULT_SIZE),
d_data(reserveSize), d_aiStream(&(d_data[0]),reserveSize) {
}
McServerProtoInputStream::~McServerProtoInputStream() {
}
bool McServerProtoInputStream::Next(const void** data, int* size) {
return d_aiStream.Next(data, size);
}
void McServerProtoInputStream::BackUp(int count) {
return d_aiStream.BackUp(count);
}
bool McServerProtoInputStream::Skip(int count) {
return d_aiStream.Skip(count);
}
int64_t McServerProtoInputStream::ByteCount() const {
return d_aiStream.ByteCount();
}
McServerProtoOutputStream::McServerProtoOutputStream() : reserveSize(DEFAULT_SIZE),
d_data(reserveSize), d_aoStream(static_cast<void*>(&(d_data[0])),reserveSize) {
}
McServerProtoOutputStream::~McServerProtoOutputStream() {
}
bool McServerProtoOutputStream::Next(void** data, int* size) {
return d_aoStream.Next(data, size);
}
void McServerProtoOutputStream::BackUp(int count) {
return d_aoStream.BackUp(count);
}
int64_t McServerProtoOutputStream::ByteCount() const {
return d_aoStream.ByteCount();
}
}
}