Skip to content

Commit ffa1a5e

Browse files
committed
add comment for longlink_packer function
fix xlogSample build error
1 parent ea52ca5 commit ffa1a5e

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

mars/stn/proto/longlink_packer.h

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
/*
15-
* longlink_packer.cpp
15+
* longlink_packer.h
1616
*
1717
* Created on: 2012-7-18
1818
* Author: yerungui
@@ -34,7 +34,24 @@
3434

3535
class AutoBuffer;
3636

37+
/**
38+
* package the request data
39+
* _cmdid: business identifier
40+
* _seq: task id
41+
* _raw: business send buffer
42+
* _packed: business send buffer + request header
43+
*/
3744
void longlink_pack(uint32_t _cmdid, uint32_t _seq, const void* _raw, size_t _raw_len, AutoBuffer& _packed);
45+
46+
/**
47+
* unpackage the response data
48+
* _packed: data received from server
49+
* _cmdid: business identifier
50+
* _seq: task id
51+
* _package_len:
52+
* _body: business receive buffer
53+
* return: 0 if unpackage succ
54+
*/
3855
int longlink_unpack(const AutoBuffer& _packed, uint32_t& _cmdid, uint32_t& _seq, size_t& _package_len, AutoBuffer& _body);
3956

4057
//heartbeat signal to keep longlink network alive
@@ -47,6 +64,10 @@ void longlink_noop_resp_body(AutoBuffer& _body);
4764
uint32_t longlink_noop_interval();
4865

4966
bool longlink_complexconnect_need_verify();
67+
68+
/**
69+
* return: whether the received data is pushing from server or not
70+
*/
5071
bool is_push_data(uint32_t _cmdid, uint32_t _taskid);
5172

5273
#endif // STN_SRC_LONGLINKPACKER_H_

samples/android/xlogSample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ task clean(type: Delete) {
2626

2727
ext {
2828
GROUP = 'com.tencent.mars'
29-
VERSION_NAME = '1.0.1'
29+
VERSION_NAME = '1.0.2'
3030
VERSION_NAME_SUFFIX = ''
3131
}
3232

0 commit comments

Comments
 (0)