Classes | |
struct | http_connection_handle_t |
Handle for a connection. More... | |
Functions | |
Scope restricted to file | |
int | Check_Connect_And_Wait_Connection (const SOCKET a_sock, const int connect_res) |
Checks socket connection and wait if it is not connected. | |
int | get_hoststr (const char *url_str, const char **hoststr, size_t *hostlen) |
Point to the hostname within a URL C-string. | |
void | copy_msg_headers (LinkedList *msgHeaders, UpnpString *headers) |
Dummy function. It do nothing since years. Do we need it? | |
int | MakeGenericMessage (http_method_t method, const char *url_str, membuffer *request, uri_type *url, int contentLength, const char *contentType, const UpnpString *headers) |
Make a generic message, what ever this mean. | |
int | ReadResponseLineAndHeaders (SOCKINFO *info, http_parser_t *parser, int *timeout_secs, int *http_error_code) |
Parses already exiting data. | |
int | MakeGetMessageEx (const char *url_str, membuffer *request, uri_type *url, SendInstruction *pRangeSpecifier) |
Make extended GetMessage. | |
Variables | |
constexpr size_t | CHUNK_HEADER_SIZE {10} |
??? | |
constexpr size_t | CHUNK_TAIL_SIZE {10} |
??? | |
constexpr time_t | DEFAULT_TCP_CONNECT_TIMEOUT {5} |
Default TCP connection timeout. | |
struct anonymous_namespace{httpreadwrite.cpp}::http_connection_handle_t |
Handle for a connection.
Definition at line 317 of file httpreadwrite.cpp.
Class Members | ||
---|---|---|
SOCKINFO | sock_info | |
int | contentLength | |
http_parser_t | response | |
int | requestStarted | |
int | cancel |
int anonymous_namespace{httpreadwrite.cpp}::Check_Connect_And_Wait_Connection | ( | const SOCKET | a_sock, |
const int | connect_res | ||
) |
Checks socket connection and wait if it is not connected.
It should be called just after connect.
[in] | a_sock | Socket file descriptor. |
[in] | connect_res | Result of connect that has been executed before calling this. |
Definition at line 108 of file httpreadwrite.cpp.
int anonymous_namespace{httpreadwrite.cpp}::get_hoststr | ( | const char * | url_str, |
const char ** | hoststr, | ||
size_t * | hostlen | ||
) |
Point to the hostname within a URL C-string.
[in] | url_str | Pointer to URL string. |
[out] | hoststr | Filled with a pointer to the start of the host string within url_str. On error this remains untouched. |
[out] | hostlen | Filled with the length (without terminating '\0') of the host string. On error this remains untouched. |
Definition at line 175 of file httpreadwrite.cpp.
void anonymous_namespace{httpreadwrite.cpp}::copy_msg_headers | ( | LinkedList * | msgHeaders, |
UpnpString * | headers | ||
) |
Dummy function. It do nothing since years. Do we need it?
Definition at line 217 of file httpreadwrite.cpp.
int anonymous_namespace{httpreadwrite.cpp}::MakeGenericMessage | ( | http_method_t | method, |
const char * | url_str, | ||
membuffer * | request, | ||
uri_type * | url, | ||
int | contentLength, | ||
const char * | contentType, | ||
const UpnpString * | headers | ||
) |
Make a generic message, what ever this mean.
Definition at line 250 of file httpreadwrite.cpp.
int anonymous_namespace{httpreadwrite.cpp}::ReadResponseLineAndHeaders | ( | SOCKINFO * | info, |
http_parser_t * | parser, | ||
int * | timeout_secs, | ||
int * | http_error_code | ||
) |
Parses already exiting data.
If not complete reads more data on the connected socket. The read data is then parsed. The same methid is carried out for headers.
info | Socket information object. |
parser | HTTP Parser object. |
timeout_secs | Time out value. |
http_error_code | HTTP errror code returned. |
Definition at line 337 of file httpreadwrite.cpp.
int anonymous_namespace{httpreadwrite.cpp}::MakeGetMessageEx | ( | const char * | url_str, |
membuffer * | request, | ||
uri_type * | url, | ||
SendInstruction * | pRangeSpecifier | ||
) |
Make extended GetMessage.
Definition at line 444 of file httpreadwrite.cpp.
|
constexpr |
???
Definition at line 83 of file httpreadwrite.cpp.
|
constexpr |
???
Definition at line 85 of file httpreadwrite.cpp.
|
constexpr |
Default TCP connection timeout.
Definition at line 90 of file httpreadwrite.cpp.