Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class RPCClient {
RpcDecoder<>* decoder = nullptr;
int _waiting_msg_id;
uint32_t _waiting_msg_id;

public:
RpcError lastError;
Expand All @@ -22,7 +22,7 @@ class RPCClient {

template<typename... Args>
void notify(const MsgPack::str_t method, Args&&... args) {
int _id;
uint32_t _id;
decoder->send_call(NOTIFY_MSG, method, _id, std::forward<Args>(args)...);
}

Expand All @@ -46,7 +46,7 @@ class RPCClient {

template<typename... Args>
bool send_rpc(const MsgPack::str_t method, Args&&... args) {
int msg_id;
uint32_t msg_id;
if (decoder->send_call(CALL_MSG, method, msg_id, std::forward<Args>(args)...)) {
_waiting_msg_id = msg_id;
return true;
Expand Down
6 changes: 3 additions & 3 deletions src/decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class RpcDecoder {
RpcDecoder(ITransport& transport) : _transport(transport) {}

template<typename... Args>
bool send_call(const int call_type, const MsgPack::str_t method, int& msg_id, Args&&... args) {
bool send_call(const int call_type, const MsgPack::str_t method, uint32_t& msg_id, Args&&... args) {

if (call_type!=CALL_MSG && call_type!=NOTIFY_MSG) return false;

Expand Down Expand Up @@ -58,7 +58,7 @@ class RpcDecoder {

MsgPack::arr_size_t resp_size;
int resp_type;
int resp_id;
uint32_t resp_id;

if (!unpacker.deserialize(resp_size, resp_type, resp_id)) return false;
if (resp_size.size() != RESPONSE_SIZE) return false;
Expand Down Expand Up @@ -157,7 +157,7 @@ class RpcDecoder {
size_t _bytes_stored = 0;
int _packet_type = NO_MSG;
size_t _packet_size = 0;
int _msg_id = 0;
uint32_t _msg_id = 0;

inline bool buffer_full() const { return _bytes_stored == BufferSize; }

Expand Down
2 changes: 1 addition & 1 deletion src/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class RPCServer {
}

int msg_type;
int msg_id;
uint32_t msg_id;
MsgPack::str_t method;
MsgPack::arr_size_t req_size;

Expand Down