#include "tcp-socket.h"
Data Structures | |
struct | http_socket |
struct | http_socket_header |
Macros | |
#define | HTTP_SOCKET_INPUTBUFSIZE UIP_TCP_MSS |
#define | HTTP_SOCKET_OUTPUTBUFSIZE UIP_TCP_MSS |
#define | HTTP_SOCKET_TIMEOUT ((2 * 60 + 30) * CLOCK_SECOND) |
#define | HTTP_SOCKET_URLLEN 128 |
Typedefs | |
typedef void(* | http_socket_callback_t )(struct http_socket *s, void *ptr, http_socket_event_t ev, const uint8_t *data, uint16_t datalen) |
Functions | |
int | http_socket_close (struct http_socket *socket) |
int | http_socket_get (struct http_socket *s, const char *url, int64_t pos, uint64_t length, http_socket_callback_t callback, void *callbackptr) |
int | http_socket_post (struct http_socket *s, const char *url, const void *postdata, uint16_t postdatalen, const char *content_type, http_socket_callback_t callback, void *callbackptr) |
#define HTTP_SOCKET_INPUTBUFSIZE UIP_TCP_MSS |
#define HTTP_SOCKET_OUTPUTBUFSIZE UIP_TCP_MSS |
#define HTTP_SOCKET_TIMEOUT ((2 * 60 + 30) * CLOCK_SECOND) |
Referenced by start_timeout_timer().
#define HTTP_SOCKET_URLLEN 128 |
typedef void(* http_socket_callback_t)(struct http_socket *s, void *ptr, http_socket_event_t ev, const uint8_t *data, uint16_t datalen) |
enum http_socket_event_t |
int http_socket_close | ( | struct http_socket * | socket | ) |
References list_head(), list_item_next(), NULL, removesocket(), http_socket::s, s, and tcp_socket_close().
int http_socket_get | ( | struct http_socket * | s, |
const char * | url, | ||
int64_t | pos, | ||
uint64_t | length, | ||
http_socket_callback_t | callback, | ||
void * | callbackptr | ||
) |
References http_socket::callback, callback, http_socket::callbackptr, init, input(), http_socket::inputbuf, http_socket::length, length, list_add(), NULL, http_socket::outputbuf, http_socket::pos, http_socket::postdata, http_socket::postdatalen, PT_INIT, http_socket::s, start_request(), strncpy(), tcp_socket_register(), http_socket::timeout_timer_started, and http_socket::url.
int http_socket_post | ( | struct http_socket * | s, |
const char * | url, | ||
const void * | postdata, | ||
uint16_t | postdatalen, | ||
const char * | content_type, | ||
http_socket_callback_t | callback, | ||
void * | callbackptr | ||
) |
References http_socket::callback, callback, http_socket::callbackptr, http_socket::content_type, init, input(), http_socket::inputbuf, http_socket::length, list_add(), http_socket::outputbuf, http_socket::pos, http_socket::postdata, http_socket::postdatalen, PT_INIT, http_socket::s, start_request(), strncpy(), tcp_socket_register(), http_socket::timeout_timer_started, and http_socket::url.