Go to the source code of this file.
These are not regular streams. They will care about transfer styles while sending/receiving data.
Supported transfer styles are
A stream will set its transfer style from the header information, which must be given while creating a stream.
A stream will start sending/receiving data "after" sending/receiving header information. (After <CF><CF>)"
Definition in file nanohttp-stream.h.
|
Transfer types supported while sending/receiving data. |
|
Transfer types supported while sending/receiving data.
Definition at line 76 of file nanohttp-stream.h. |
|
Free input stream. Note that the socket will not be closed by this functions.
Definition at line 162 of file nanohttp-stream.c. References http_input_stream_t::deleteOnExit, http_input_stream_t::fd, http_input_stream_t::filename, HTTP_TRANSFER_FILE, log_info2, and http_input_stream_t::type. Referenced by hrequest_free(), hresponse_free(), and hresponse_new_from_socket(). |
|
Returns the actual status of the stream. Definition at line 422 of file nanohttp-stream.c. References http_input_stream_t::err, H_OK, HTTP_TRANSFER_CHUNKED, HTTP_TRANSFER_CONNECTION_CLOSE, HTTP_TRANSFER_CONTENT_LENGTH, HTTP_TRANSFER_FILE, and http_input_stream_t::type. Referenced by mime_streamreader_function(). |
|
Creates a new input stream. Definition at line 84 of file nanohttp-stream.c. References http_input_stream_t::chunk_size, http_input_stream_t::connection_closed, http_input_stream_t::content_length, http_input_stream_t::err, H_OK, HEADER_CONTENT_LENGTH, hpairnode_dump_deep(), hpairnode_get_ignore_case(), HTTP_TRANSFER_CHUNKED, HTTP_TRANSFER_CONNECTION_CLOSE, HTTP_TRANSFER_CONTENT_LENGTH, log_error2, log_verbose1, http_input_stream_t::received, http_input_stream_t::sock, and http_input_stream_t::type. Referenced by hresponse_new_from_socket(). |
|
Creates a new input stream from file. This function was added for MIME messages and for debugging. Definition at line 134 of file nanohttp-stream.c. References http_input_stream_t::deleteOnExit, http_input_stream_t::fd, http_input_stream_t::filename, HTTP_TRANSFER_FILE, log_error2, and http_input_stream_t::type. Referenced by hresponse_new_from_socket(). |
|
Returns the actual read bytes <0 on error Definition at line 452 of file nanohttp-stream.c. References http_input_stream_t::err, H_OK, herror_new(), HTTP_TRANSFER_CHUNKED, HTTP_TRANSFER_CONNECTION_CLOSE, HTTP_TRANSFER_CONTENT_LENGTH, HTTP_TRANSFER_FILE, STREAM_ERROR_INVALID_TYPE, and http_input_stream_t::type. Referenced by httpd_get_postdata(), and mime_streamreader_function(). |
|
Sends finish flags if nesseccary (like in chunked transport). Call always this function before closing the connections.
Definition at line 605 of file nanohttp-stream.c. References H_OK, hsocket_send_string(), HTTP_TRANSFER_CHUNKED, http_output_stream_t::sock, and http_output_stream_t::type. Referenced by httpc_mime_end(), httpc_post_end(), and httpd_mime_end(). |
|
Free output stream Definition at line 552 of file nanohttp-stream.c. Referenced by httpc_free(), and httpd_free(). |
|
Creates a new output stream. Transfer code will be found from header. Definition at line 503 of file nanohttp-stream.c. References http_output_stream_t::content_length, HEADER_CONTENT_LENGTH, hpairnode_get_ignore_case(), HTTP_TRANSFER_CHUNKED, HTTP_TRANSFER_CONNECTION_CLOSE, HTTP_TRANSFER_CONTENT_LENGTH, log_error2, log_verbose1, http_output_stream_t::sent, http_output_stream_t::sock, and http_output_stream_t::type. Referenced by httpc_post_begin(), and httpd_send_header(). |
|
Writes 'size' bytes of 'bytes' into stream. Returns socket error flags or H_OK. Definition at line 564 of file nanohttp-stream.c. References H_OK, hsocket_send(), hsocket_send_string(), HTTP_TRANSFER_CHUNKED, http_output_stream_t::sock, and http_output_stream_t::type. Referenced by http_output_stream_write_string(), httpc_mime_end(), httpc_mime_next(), httpc_mime_send_file(), httpd_mime_end(), httpd_mime_next(), and httpd_mime_send_file(). |
|
Writes 'strlen()' bytes of 'str' into stream. Returns socket error flags or H_OK. Definition at line 597 of file nanohttp-stream.c. References http_output_stream_write(). |