1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For #1508, support chunk length and content in multiple parts.

This commit is contained in:
winlin 2019-12-24 14:58:35 +08:00
parent a35a7f915e
commit 7eccc9da26
7 changed files with 243 additions and 85 deletions

View file

@ -261,9 +261,9 @@ private:
SrsFastStream* buffer;
bool is_eof;
// The left bytes in chunk.
int nb_left_chunk;
size_t nb_left_chunk;
// The number of bytes of current chunk.
int nb_chunk;
size_t nb_chunk;
// Already read total bytes.
int64_t nb_total_read;
public:
@ -274,10 +274,10 @@ public:
// Interface ISrsHttpResponseReader
public:
virtual bool eof();
virtual srs_error_t read(char* data, int nb_data, int* nb_read);
virtual srs_error_t read(void* buf, size_t size, ssize_t* nread);
private:
virtual srs_error_t read_chunked(char* data, int nb_data, int* nb_read);
virtual srs_error_t read_specified(char* data, int nb_data, int* nb_read);
virtual srs_error_t read_chunked(void* buf, size_t size, ssize_t* nread);
virtual srs_error_t read_specified(void* buf, size_t size, ssize_t* nread);
};
#endif