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
f5787584
Commit
f5787584
authored
Jun 24, 2020
by
李维杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整请求
parent
da2ae639
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletions
+16
-1
cmd_processer_server.cc
cmu/src/cmd_processer_server.cc
+15
-1
mqtt_request.cc
thirdparty/mqtt/mqtt_request.cc
+1
-0
No files found.
cmu/src/cmd_processer_server.cc
View file @
f5787584
...
@@ -99,7 +99,16 @@ namespace offcn
...
@@ -99,7 +99,16 @@ namespace offcn
}
}
else
else
{
{
client_lists_
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
from_id
,
"null"
));
if
(
client_lists_
.
size
()
==
0
)
{
client_lists_
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
from_id
,
"rtmp"
));
}
else
{
client_lists_
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
from_id
,
"null"
));
}
//response
response
=
MqttRequest
::
BuildResponse
(
message_id
,
"ok"
);
response
=
MqttRequest
::
BuildResponse
(
message_id
,
"ok"
);
mqtt_wrapper_
->
SendRequest
(
from_id
,
response
);
mqtt_wrapper_
->
SendRequest
(
from_id
,
response
);
...
@@ -107,6 +116,11 @@ namespace offcn
...
@@ -107,6 +116,11 @@ namespace offcn
std
::
map
<
std
::
string
,
std
::
string
>::
iterator
itor
;
std
::
map
<
std
::
string
,
std
::
string
>::
iterator
itor
;
for
(
itor
=
client_lists_
.
begin
();
itor
!=
client_lists_
.
end
();
itor
++
)
for
(
itor
=
client_lists_
.
begin
();
itor
!=
client_lists_
.
end
();
itor
++
)
{
{
if
(
itor
->
first
.
compare
(
from_id
)
!=
0
&&
itor
->
second
.
compare
(
"rtmp"
)
==
0
)
{
response
=
MqttRequest
::
PublishersRequest
(
"sdf"
,
from_id
,
itor
->
first
);
mqtt_wrapper_
->
SendRequest
(
from_id
,
response
);
}
printf
(
"id = %s, pull type = %s
\n
"
,
itor
->
first
.
c_str
(),
itor
->
second
.
c_str
());
printf
(
"id = %s, pull type = %s
\n
"
,
itor
->
first
.
c_str
(),
itor
->
second
.
c_str
());
}
}
printf
(
"------------------------------------
\n
"
);
printf
(
"------------------------------------
\n
"
);
...
...
thirdparty/mqtt/mqtt_request.cc
View file @
f5787584
...
@@ -205,6 +205,7 @@ namespace offcn
...
@@ -205,6 +205,7 @@ namespace offcn
Json
::
Value
root
;
Json
::
Value
root
;
Json
::
StreamWriterBuilder
wBuilder
;
Json
::
StreamWriterBuilder
wBuilder
;
root
[
"method"
]
=
"response"
;
root
[
"message_id"
]
=
message_id
;
root
[
"message_id"
]
=
message_id
;
root
[
"result_code"
]
=
result_code
;
root
[
"result_code"
]
=
result_code
;
...
...
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