mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
srs-librtmp: add complex handshake.
This commit is contained in:
parent
76f37baafe
commit
4f91cae377
1 changed files with 19 additions and 1 deletions
|
@ -183,7 +183,25 @@ int srs_complex_handshake(srs_rtmp_t rtmp)
|
|||
return ERROR_RTMP_HS_SSL_REQUIRE;
|
||||
#endif
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
srs_assert(rtmp != NULL);
|
||||
Context* context = (Context*)rtmp;
|
||||
|
||||
// parse uri, resolve host, connect to server:port
|
||||
if ((ret = srs_librtmp_context_connect(context)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
// complex handshake
|
||||
srs_freep(context->rtmp);
|
||||
context->rtmp = new SrsRtmpClient(context->skt);
|
||||
|
||||
if ((ret = context->rtmp->complex_handshake()) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int srs_connect_app(srs_rtmp_t rtmp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue