Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cmu
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李维杰
cmu
Commits
8a3b42dd
Commit
8a3b42dd
authored
Jun 18, 2020
by
李维杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add request logic
parent
c58b6f67
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
2 deletions
+12
-2
cmd_processer_server.cc
cmu/src/cmd_processer_server.cc
+2
-1
kcp-client.vcxproj
kcp-client/kcp-client.vcxproj
+2
-0
kcp-client.vcxproj.filters
kcp-client/kcp-client.vcxproj.filters
+6
-0
cmd_processer_client.cc
kcp-client/src/cmd_processer_client.cc
+2
-1
No files found.
cmu/src/cmd_processer_server.cc
View file @
8a3b42dd
...
...
@@ -51,6 +51,6 @@ namespace offcn
}
void
CmdProcesserServer
::
OnServerMessageArrived
(
std
::
string
topic
,
std
::
string
message
)
{
printf
(
"receive message : topic = %s, context : %s
\n
"
,
topic
.
c_str
(),
message
.
c_str
());
printf
(
"
\n
receive message : topic = %s, context : %s
\n
"
,
topic
.
c_str
(),
message
.
c_str
());
}
}
\ No newline at end of file
kcp-client/kcp-client.vcxproj
View file @
8a3b42dd
...
...
@@ -22,12 +22,14 @@
<ClCompile
Include=
"..\thirdparty\jsoncpp\src\json_reader.cpp"
/>
<ClCompile
Include=
"..\thirdparty\jsoncpp\src\json_value.cpp"
/>
<ClCompile
Include=
"..\thirdparty\jsoncpp\src\json_writer.cpp"
/>
<ClCompile
Include=
"..\thirdparty\mqtt\mqtt_request.cc"
/>
<ClCompile
Include=
"..\thirdparty\mqtt\mqtt_wrapper.cc"
/>
<ClCompile
Include=
"src\cmd_processer_client.cc"
/>
<ClCompile
Include=
"src\kcp-client.cpp"
/>
</ItemGroup>
<ItemGroup>
<ClInclude
Include=
"..\thirdparty\jsoncpp\src\json_tool.h"
/>
<ClInclude
Include=
"..\thirdparty\mqtt\mqtt_request.h"
/>
<ClInclude
Include=
"..\thirdparty\mqtt\mqtt_wrapper.h"
/>
<ClInclude
Include=
"src\cmd_processer_client.h"
/>
</ItemGroup>
...
...
kcp-client/kcp-client.vcxproj.filters
View file @
8a3b42dd
...
...
@@ -39,6 +39,9 @@
<ClCompile Include="..\thirdparty\jsoncpp\src\json_writer.cpp">
<Filter>源文件\json</Filter>
</ClCompile>
<ClCompile Include="..\thirdparty\mqtt\mqtt_request.cc">
<Filter>源文件\mqtt</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\thirdparty\mqtt\mqtt_wrapper.h">
...
...
@@ -50,6 +53,9 @@
<ClInclude Include="..\thirdparty\jsoncpp\src\json_tool.h">
<Filter>源文件\json</Filter>
</ClInclude>
<ClInclude Include="..\thirdparty\mqtt\mqtt_request.h">
<Filter>源文件\mqtt</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\thirdparty\jsoncpp\src\json_valueiterator.inl">
...
...
kcp-client/src/cmd_processer_client.cc
View file @
8a3b42dd
#include "cmd_processer_client.h"
#include "mqtt_request.h"
namespace
offcn
{
...
...
@@ -46,7 +47,7 @@ namespace offcn
printf
(
"subscribe topic success!
\n
"
);
std
::
string
topic
=
kGlobalTopic
;
std
::
string
req
=
"I am Programmer"
;
std
::
string
req
=
MqttRequest
::
JoinRequest
(
kLocalID
);
;
mqtt_wrapper_
->
SendRequest
(
topic
,
req
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment