srs-librtmp: add complex handshake.
This commit is contained in:
parent
76f37baafe
commit
4f91cae377
|
|
@ -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…
Reference in New Issue
Block a user