mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine code for hooks and http core.
This commit is contained in:
parent
79fdc4e766
commit
f516636448
12 changed files with 144 additions and 43 deletions
|
@ -178,6 +178,20 @@ void SrsCommonMessage::create_payload(int size)
|
|||
#endif
|
||||
}
|
||||
|
||||
int SrsCommonMessage::create(SrsMessageHeader* pheader, char* body, int size)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
// drop previous payload.
|
||||
srs_freepa(payload);
|
||||
|
||||
this->header = *pheader;
|
||||
this->payload = body;
|
||||
this->size = size;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
SrsSharedPtrMessage::SrsSharedPtrPayload::SrsSharedPtrPayload()
|
||||
{
|
||||
payload = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue