Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2013-10-18 22:04:39 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fbe6e061c0d50d4b6f09003fe9e0ad8a7666396a
fbe6e061
1 parent
3976a178
simple handshake(specified by rtmp protocol v1.0) success
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
21 行增加
和
0 行删除
trunk/src/core/srs_core_rtmp.cpp
trunk/src/core/srs_core_rtmp.cpp
查看文件 @
fbe6e06
...
...
@@ -51,6 +51,7 @@ int SrsRtmp::handshake()
srs_warn
(
"read c0c1 failed. ret=%d"
,
ret
);
return
ret
;
}
srs_verbose
(
"read c0c1 success."
);
// plain text required.
if
(
c0c1
[
0
]
!=
0x03
)
{
...
...
@@ -58,6 +59,26 @@ int SrsRtmp::handshake()
srs_warn
(
"only support rtmp plain text. ret=%d"
,
ret
);
return
ret
;
}
srs_verbose
(
"check c0 success, required plain text."
);
char
*
s0s1s2
=
new
char
[
3073
];
SrsAutoFree
(
char
,
s0s1s2
,
true
);
s0s1s2
[
0
]
=
0x03
;
// plain text.
if
((
ret
=
skt
.
write
(
s0s1s2
,
3073
,
&
nsize
))
!=
ERROR_SUCCESS
)
{
srs_warn
(
"send s0s1s2 failed. ret=%d"
,
ret
);
return
ret
;
}
srs_verbose
(
"send s0s1s2 success."
);
char
*
c2
=
new
char
[
1536
];
SrsAutoFree
(
char
,
c2
,
true
);
if
((
ret
=
skt
.
read_fully
(
c2
,
1536
,
&
nsize
))
!=
ERROR_SUCCESS
)
{
srs_warn
(
"read c2 failed. ret=%d"
,
ret
);
return
ret
;
}
srs_verbose
(
"read c2 success."
);
srs_trace
(
"handshake success."
);
return
ret
;
}
...
...
请
注册
或
登录
后发表评论