mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
SquashSRS4: Fix DTLS warnings for HTTP api
This commit is contained in:
parent
fcf72b48f9
commit
237c1e4d3d
2 changed files with 73 additions and 1 deletions
|
@ -961,10 +961,63 @@ bool SrsDtlsServerImpl::is_dtls_client()
|
|||
return false;
|
||||
}
|
||||
|
||||
SrsDtlsEmptyImpl::SrsDtlsEmptyImpl() : SrsDtlsImpl(NULL)
|
||||
{
|
||||
handshake_done_for_us = true;
|
||||
}
|
||||
|
||||
SrsDtlsEmptyImpl::~SrsDtlsEmptyImpl()
|
||||
{
|
||||
}
|
||||
|
||||
srs_error_t SrsDtlsEmptyImpl::initialize(std::string version, std::string role)
|
||||
{
|
||||
return srs_success;
|
||||
}
|
||||
|
||||
srs_error_t SrsDtlsEmptyImpl::start_active_handshake()
|
||||
{
|
||||
return srs_success;
|
||||
}
|
||||
|
||||
bool SrsDtlsEmptyImpl::should_reset_timer()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
srs_error_t SrsDtlsEmptyImpl::on_dtls(char* data, int nb_data)
|
||||
{
|
||||
return srs_success;
|
||||
}
|
||||
|
||||
srs_error_t SrsDtlsEmptyImpl::get_srtp_key(std::string& recv_key, std::string& send_key)
|
||||
{
|
||||
return srs_success;
|
||||
}
|
||||
|
||||
void SrsDtlsEmptyImpl::callback_by_ssl(std::string type, std::string desc)
|
||||
{
|
||||
}
|
||||
|
||||
srs_error_t SrsDtlsEmptyImpl::on_final_out_data(uint8_t* data, int size)
|
||||
{
|
||||
return srs_success;
|
||||
}
|
||||
|
||||
srs_error_t SrsDtlsEmptyImpl::on_handshake_done()
|
||||
{
|
||||
return srs_success;
|
||||
}
|
||||
|
||||
bool SrsDtlsEmptyImpl::is_dtls_client()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
SrsDtls::SrsDtls(ISrsDtlsCallback* callback)
|
||||
{
|
||||
callback_ = callback;
|
||||
impl = new SrsDtlsServerImpl(callback);
|
||||
impl = new SrsDtlsEmptyImpl();
|
||||
}
|
||||
|
||||
SrsDtls::~SrsDtls()
|
||||
|
|
|
@ -190,6 +190,25 @@ protected:
|
|||
virtual bool is_dtls_client();
|
||||
};
|
||||
|
||||
class SrsDtlsEmptyImpl : public SrsDtlsImpl
|
||||
{
|
||||
public:
|
||||
SrsDtlsEmptyImpl();
|
||||
virtual ~SrsDtlsEmptyImpl();
|
||||
public:
|
||||
virtual srs_error_t initialize(std::string version, std::string role);
|
||||
virtual srs_error_t start_active_handshake();
|
||||
virtual bool should_reset_timer();
|
||||
virtual srs_error_t on_dtls(char* data, int nb_data);
|
||||
public:
|
||||
srs_error_t get_srtp_key(std::string& recv_key, std::string& send_key);
|
||||
void callback_by_ssl(std::string type, std::string desc);
|
||||
protected:
|
||||
virtual srs_error_t on_final_out_data(uint8_t* data, int size);
|
||||
virtual srs_error_t on_handshake_done();
|
||||
virtual bool is_dtls_client();
|
||||
};
|
||||
|
||||
class SrsDtls
|
||||
{
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue